Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $nomention
- $c[!starthunt]
- $setServerVar[treasureX;$random[1;10]]
- $setServerVar[treasureY;$random[1;10]]
- $setServerVar[turns;5]
- $setServerVar[lastDig;0]
- The treasure hunt has begun! You have 5 turns to find the treasure on a 10x10 grid. Use !dig x y to dig at coordinates (x,y).
- $c[!dig]
- $onlyIf[$getServerVar[turns]>0;The hunt is over. Use !starthunt to begin a new game.]
- $onlyIf[$message[1]!=;Please provide both x and y coordinates. Usage: !dig x y]
- $onlyIf[$message[2]!=;Please provide both x and y coordinates. Usage: !dig x y]
- $onlyIf[$checkCondition[$message[1]>=1]$checkCondition[$message[1]<=10]==truetrue;X coordinate must be between 1 and 10.]
- $onlyIf[$checkCondition[$message[2]>=1]$checkCondition[$message[2]<=10]==truetrue;Y coordinate must be between 1 and 10.]
- $var[treasureX;$getServerVar[treasureX]]
- $var[treasureY;$getServerVar[treasureY]]
- $var[digX;$message[1]]
- $var[digY;$message[2]]
- $var[distanceX;$sub[$var[treasureX];$var[digX]]]
- $var[distanceY;$sub[$var[treasureY];$var[digY]]]
- $var[distance;$sum[$if[$var[distanceX]<0;$multi[$var[distanceX];-1];$var[distanceX]];$if[$var[distanceY]<0;$multi[$var[distanceY];-1];$var[distanceY]]]]
- $if[$checkCondition[$var[digX]==$var[treasureX]]$checkCondition[$var[digY]==$var[treasureY]]==truetrue]
- Congratulations! You found the treasure at ($var[digX],$var[digY])!
- $setServerVar[turns;0]
- $else
- $var[lastDistance;$getServerVar[lastDig]]
- $setServerVar[lastDig;$var[distance]]
- $setServerVar[turns;$sub[$getServerVar[turns];1]]
- No treasure at ($var[digX],$var[digY]).
- $if[$getServerVar[turns]==0]
- Game over! The treasure was at ($var[treasureX],$var[treasureY]).
- $elseIf[$var[lastDistance]==0]
- Try again! You have $getServerVar[turns] turns left.
- $elseIf[$var[distance]<$var[lastDistance]]
- The treasure is getting warmer! It's near somewhere! You have $getServerVar[turns] turns left.
- $else
- The treasure is getting colder. It's going far! You have $getServerVar[turns] turns left.
- $endif
- $endif
- $description[
- ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
- ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
- ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
- ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
- ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
- ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
- ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
- ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
- ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
- ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
- ]
Advertisement
Add Comment
Please, Sign In to add comment