Jump to content
  • 0

Ygg exchanger


Question

Posted

Can you help me with my script. i actually did it myself, the problem is when you trade a lot of ygg tickets they will be traded but if you are overweight they will be dropped.

 

How can i make the npc not to trade the tickets if he will be overweight? and tell the person that he can;t carry it.

 

Note: i changed a certain item into ygg ticket which can be traded 10Ygg each.exchanger.txt

4 answers to this question

Recommended Posts

Posted

I believe just change the weight variable from uint16 into int should've fix it ... though

 

if you want to simulate how the checkweight script command with script, also can

from my understanding, there are 3 checks

 

1.max inventory size

since your script only gives 1 type of item, so just do

getinventorylist;

if ( @inventorylist_count == 100 ) dispbottom "You have carry too many items.";

 

2. max item stack sinze

if ( ( countitem(607) + .@amount*10 ) > 30000 ) dispbottom "You can't carry more than 30,000 berry";

3. maxweight

I already did it in the bug tracker

if ( ( weight + ( getiteminfo(607,6) * .@amount*10 ) ) > maxweight ) dispbottom "You can't carry this amount of berry because you'll overweight !";

Posted

I believe just change the weight variable from uint16 into int should've fix it ... though

 

if you want to simulate how the checkweight script command with script, also can

from my understanding, there are 3 checks

 

1.max inventory size

since your script only gives 1 type of item, so just do

getinventorylist;

if ( @inventorylist_count == 100 ) dispbottom "You have carry too many items.";

 

2. max item stack sinze

if ( ( countitem(607) + .@amount*10 ) > 30000 ) dispbottom "You can't carry more than 30,000 berry";

3. maxweight

I already did it in the bug tracker

if ( ( weight + ( getiteminfo(607,6) * .@amount*10 ) ) > maxweight ) dispbottom "You can't carry this amount of berry because you'll overweight !";

 

I'll try those. thanks for your help..

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...