Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Anything in "<>" is what YOU edit. Also, you can add as many buttons as you'd like for Quest Items (look starting at line 5) as long as you follow the format for the Button Text, and classify them as buttons (like Line 8-10), AND make sure they have a response output (like like 13-15).
- Quest GUI Code for Madcommands:
- cmd create <command name> <description>
- cmd insert <command name> 1 %player% = %p%
- cmd insert <command name> 2 %gui%[\"type\"] = \"form\"
- cmd insert <command name> 3 %gui%[\"title\"] = \"<title>\"
- cmd insert <command name> 4 %gui%[\"content\"] = \"<content>\"
- cmd insert <command name> 5 %button0%[\"text\"] = \"<Required Quest Item 1>\"
- cmd insert <command name> 6 %button1%[\"text\"] = \"<Required Quest Item 2>\"
- cmd insert <command name> 7 %button2%[\"text\"] = \"<Required Quest Item 3>\"
- cmd insert <command name> 8 %buttons%[] = %button0%
- cmd insert <command name> 9 %buttons%[] = %button1%
- cmd insert <command name> 10 %buttons%[] = %button2%
- cmd insert <command name> 11 %gui%[\"buttons\"] = %buttons%
- cmd insert <command name> 12 %response% = dialog(%player%,%gui%)
- cmd insert <command name> 13 if %response% = 0 then goto 50
- cmd insert <command name> 14 if %response% = 1 then goto 60
- cmd insert <command name> 15 if %response% = 2 then goto 76
- cmd insert <command name> 16 exit
- Here is where you customize rewards and make sure the command reads the Item in their hand properly.
- Let's say, for example, that "Required Quest Item 1" is 6 blocks of Stone, Item 2 is 50 Blocks of Andesite, and Item 3 is 19 Compasses.
- Then, let's say that the rewars for the Stone is $500, the Andesite is $400 and 6 Steak, and the Compasses are $1500 and they get 2 Diamonds named Steve. (You can set up the rewards to be anything you want, a rank change, give them money, give them items, ban them, kick them, change their gamemode, etc etc etc, whatever you want it to be. The stuff above is just for example purposes).
- cmd insert <command name> 50 let %hand% = playerhand(%p%)
- cmd insert <command name> 51 if %hand%[\"id\"] = \"1\" then goto 54
- cmd insert <command name> 52 message %p% <whatever you want it to say to tell the player they aren't holding the right item>
- cmd insert <command name> 53 exit
- cmd insert <command name> 54 if %hand%[\"count\"] >= \"6\" then goto 57
- cmd insert <command name> 55 message %p% <whatever you want it to say to tell the player they don't have enough of the right item>
- cmd insert <command name> 56 exit
- cmd insert <command name> 57 ascon /rmitem %p% 1 6
- cmd insert <command name> 58 ascon /givemoney %p% 500
- cmd insert <command name> 59 exit
- cmd insert <command name> 60 let %hand% = playerhand(%p%)
- cmd insert <command name> 61 if %hand%[\"id\"] = \"1\" then goto 64
- cmd insert <command name> 62 message %p% <whatever you want it to say to tell the player they aren't holding the right item>
- cmd insert <command name> 63 exit
- cmd insert <command name> 64 if %hand%[\"variant\"] = \"5\" then goto 67
- cmd insert <command name> 65 message %p% <whatever you want it to say to tell the player they aren't holding the right item>
- cmd insert <command name> 66 exit
- cmd insert <command name> 67 if %hand%[\"count\"] >= \"50\" then goto 70
- cmd insert <command name< 68 message %p% <whatever you want it to say to tell the player they don't have enough of the right item>
- cmd insert <command name> 69 exit
- cmd insert <command name> 70 ascon /rmitem %p% 1:5 50
- cmd insert <command name> 71 ascon /givemoney %P% 400
- cmd insert <command name> 72 sleep 1
- cmd insert <command name> 73 #always have a sleep added whenever you are giving a player something after removing something else from their inventory, otherwise, it doesn't give them the item (this line doesn't affect the code)
- cmd insert <command name> 74 ascon /give %p% steak 6
- cmd insert <command name> 75 exit
- cmd insert <command name> 76 let %hand% = playerhand(%p%)
- cmd insert <command name> 77 if %hand%[\"id\"] = \"345\" then goto 80
- cmd insert <command name> 78 message %p% <whatever you want it to say to tell the player they aren't holding the right item>
- cmd insert <command name> 79 exit
- cmd insert <command name> 80 if %hand%[\"count\"] >= \"19\" then goto 83
- cmd insert <command name> 81 message %p% <whatever you want it to say to tell the player they don't have enough of the right item>
- cmd insert <command name> 82 exit
- cmd insert <command name> 83 ascon /rmitem %p% 345 19
- cmd insert <command name> 84 ascon /givemoney %p% 1500
- cmd insert <command name> 85 sleep 1
- cmd insert <command name> 86 ascon /give %p% 261 2 {display:{Name:\"Steve\"}}
- cmd insert <command name> 87 exit
- That's it for a basic/general quest command. You can, however, exclude certain groups/ranks from seeing certain quests (for example, a prisons server with A mine specific quests, and then b mine specific quests, and so on, but you'll have to DM me for that kind of thing).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement