Not sure where I am going wrong:

Quote:

[Addon]
Script=Pirates-GamePad
Version=1.0
Author=DR DevTeam
Desc=!Pirates Game Pad
For=DragonRyder v13.5
Date=May 29th 2019
;NOTE: mod done with permission
;[Mon. Apr. 23 2007 2:41pm] <Ryu> you mind if i mod it to make it so it will do cd
;[Mon. Apr. 23 2007 2:41pm] <lurk3r> np, do what yer like lol

menu channel {
!Pirates GamePad: {
set %pirates.chan $iif(%pirates.chan != $chan,$iif($$input(Change !Pirates channel to $chan $+ ?,y,Uno Channel is %pirates.chan),$chan,%pirates.chan),$chan)
if (%pirates.chan == $chan) { dialog $iif(!$dialog(DRDT-PiratesAddon),-md,-ev) DRDT-PiratesAddon DRDT-PiratesAddon }
}
}

dialog DRDT-PiratesAddon {
title "!Pirates Game Pad v1.0"
size -1 -1 274 96
option dbu
button "bored", 101, 21 17 30 12
button "awake", 103, 53 17 30 12
button "bot", 105, 85 17 30 12
button "brig", 107, 117 17 30 12
button "weapon", 109, 149 17 30 12
button "dig", 201, 21 33 30 12
button "fish", 203, 53 33 30 12
button "crabbin", 205, 85 33 30 12
button "work", 207, 117 33 30 12
button "steal", 209, 149 33 30 12
button "love", 301, 21 49 30 12
button "hate", 303, 53 49 30 12
button "legends", 305, 85 49 30 12
button "Lottery", 307, 117 49 30 12
button "scour", 309, 149 49 30 12
button "maps", 401, 21 65 30 12
button "mutiny", 403, 53 65 30 12
button "Party", 405, 85 65 30 12
button "rusty", 407, 117 65 30 12
button "search", 409, 149 65 30 12
text "Arrr....", 100, 1 19 19 8, center
text "Matey!", 200, 1 35 19 8, center
text "Ship", 300, 1 51 19 8, center
text "Ahoy!", 400, 1 67 19 8, center
button "daily", 111, 181 17 29 12
button "goals", 112, 211 17 29 12
button "heal", 113, 241 17 29 12
button "lockpick", 211, 181 33 29 12
button "snatch", 212, 211 33 29 12
button "dive", 213, 241 33 29 12
button "top", 311, 181 49 29 12
button "tavern", 312, 211 49 29 12
button "mercy", 313, 241 49 29 12
button "stamina", 411, 181 65 29 12
button "ship", 412, 211 65 29 12
button "troll", 413, 241 65 29 12
button "tasks", 1, 2 2 33 10
button "carry", 2, 37 2 32 10
button "about", 11, 21 81 44 12
button "achievement", 12, 67 81 44 12
text "!Pirates", 20, 115 83 25 8, center
button "captain", 21, 147 82 30 10
button "capn favor", 22, 178 82 30 10
button "capn rep", 23, 209 82 30 10
button "capn stats", 24, 240 82 30 10
button "rig", 8, 215 2 26 10
button "steer", 9, 243 2 26 10
button "repair", 7, 187 2 26 10
button "fix", 5, 128 2 26 10
button "lookout", 6, 156 2 26 10
button "cook", 4, 100 2 26 10
button "Age", 10, 2 81 17 12
button "clean", 3, 72 2 26 10
}
on *:dialog:DRDT-PiratesAddon:init:*:{
var %pirates.play
dialog -t $dname $dialog($dname).title Now playing in %pirates.chan
}
on *:dialog:DRDT-PiratesAddon:sclick:1-10,11-12,21-24,111-113,211-213,311-313,411-413: {
if ($did isnum 1-12) {
%pirates.play = p tasks|p carry|p clean|p cook|p fix|p lookout|p repair|p rig|p steer|p age|about|achievement
%pirates.play = $gettok(%pirates.play,$did,124)
}
elseif ($did isnum 111-113) {
%pirates.play = p daily|p goals|p heal aye
%pirates.play = $gettok(%pirates.play,$did,12)
}
elseif ($did isnum 211-213) {
%pirates.play = p lockpick $$?="enter pirate name:"|p snatch|p dive
%pirates.play = $gettok(%pirates.play,$did,12)
}
elseif ($did isnum 311-313) {
%pirates.play = p top|p tavern brandy|p mercy aye
%pirates.play = $gettok(%pirates.play,$did,12)
}
elseif ($did isnum 411-413) {
%pirates.play = p stamina|p ship|p troll $$?="enter pirate name:"
%pirates.play = $gettok(%pirates.play,$did,12)
}
elseif ($did isnum 21-24) {
%pirates.len = $len($did($did))
%pirates.play = p $left($did($did),%pirates.len)
}
else {
%pirates.play = $iif($right($did,2) < 11,$right($did,1),$gettok($right($did,1),32))
%pirates.play = $+(%pirates.play)
}
if ($did isnum 11-12) || ($did > 100) {
%pirates.play = $+(p,$chr(32),%pirates.play)
}
msg %pirates.chan %pirates.play
}