Jump to content
  • 0

Ygg exchanger


xxx69

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  12/01/13
  • Last Seen:  

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

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  12/01/13
  • Last Seen:  

Is there any other solution aside from checkweight command?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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 !";

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  12/01/13
  • Last Seen:  

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..

Link to comment
Share on other sites

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.

×
×
  • Create New...