View Single Post
  #1  
Old 11-16-2017, 12:43 AM
Movement
Sarnak
 
Join Date: Sep 2011
Posts: 77
Default Script for LDoN/Adventure Merchant

Can anyone tell me what the perl script would be for turning in a stack of items to an adventure merchant and adding LDoN points based on the amount in the stack? ie. 1 unit or item = 1 point. But a stack of 1000 would equal 1000 points.

I have a script but its not working.. Here is my script.

Code:
sub EVENT_ITEM {
if ($itemcount{4613} >0) {
quest::UpdateLDoNPoints(1 * $itemcount{4613}, 1);
}
}
I have also tried this variant:

Code:
sub EVENT_ITEM {
if ($itemcount{4613} >0) {
quest::addldonpoints(1 * $itemcount{4613}, 1);
}
}
What the code above is supposed to do is give 1 point per item turned in. The "items" stack to 1000. Turn in a stack of 500 of them, get 500 points added.

The problem is its not "awarding" the points. Maybe I need to zone to check (havent checked this to see) but its not updating immediately if thats the case.

Any way, if anyone has insight into why this isnt working it would be greatly appreciated.

I have scoured google, this forum, and the wiki but coming up empty on this.

Thanks in advance!

Edit: zoning isnt working =/
Reply With Quote