close
Printable View
close
c.getItems().addItem(id, amount);
in clicking buttons or dialogue handler?
ClickingbuttonsQuote:
Originally Posted by Gibson1 [Only registered and activated users can see links. Click Here To Register...]
it can also be done in dialoguehandler...
c.nextChat = 500;
case 500:
if (c.getItems().freeSlots() > 0) {
c.getItems().addItem(####, #);
sendStatement("Santa hands you a gift.");
} else
sendStatement("You must empty an inventory space to continue.");
break;
i used this code in action handler, as i couldnt get it to work in clicking buttons or dialogue handler.Quote:
Originally Posted by z0mg_beast [Only registered and activated users can see links. Click Here To Register...]
only problem im having is players can click and get the item over and over and over again though i only want santa to give them the item once if this is possible?
Also I Get The Item When I Click On The Npc, Id Prefer Somewhere In The Dialogue Somthing Like
Code:case 8001:
sendNpcChat4("HoHoHo! Merry! Christ", "....", "WAIT!",
"You Might Just Be The One To Help Me Save Christmas!", c.talkingNpc, "Santa");
c.nextChat = 8002;
break;
case 8002:
sendNpcChat4("Yes You Are The One!", "Take They Presents I Gave You", "And Give Them To 3 Children",
"Then Return To Me!", c.talkingNpc, "Santa");
GET ITEM HERE
break;