Jump to content
  • 0
ThyroDree

Overweight + Open a Box Contain 100 Ygg

Question

help me  if the player is Overweight and Open a Box Contain 100 Ygg how can i make it not drop i will direct put on storage?

 

is this possible?

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Script

[cbox]function script checkweight {

setarray .@item[0],607; <- Ygg
setarray .@quantity[0],500; <- Quantity
setarray .@returnit[0],501; <- Change it to itemid Yggdrasil box
if( checkweight2( .@item,.@quantity ) ){
getitem .@items,500;
}else{
mes "You are overweight.";
getitem .@returnit, 1;
close2;
}
}[/cbox]

 

 

Item Script

[cbox]{ callfunc "checkweight"; },{},{}[/cbox]

 

 

try this

Edited by leloush

Share this post


Link to post
Share on other sites
  • 0

is this auto direct on storage?

oops sry i misread ur post.

 

nope its not, but instead of directing in storage, it will return the box.. and will pop up a msg you are overweight..

 

sry im just starting my career in script writing.. idk if there is a script com. that will direct the item to storage.

Share this post


Link to post
Share on other sites
  • 0

 

is this auto direct on storage?

oops sry i misread ur post.

 

nope its not, but instead of directing in storage, it will return the box.. and will pop up a msg you are overweight..

 

sry im just starting my career in script writing.. idk if there is a script com. that will direct the item to storage.

Okay i think i will use this :) hope it will work  ill give u an ^

Share this post


Link to post
Share on other sites
  • 0

np, glad to help.. honeslty i dont reps since im not pro like them :P ^  just a simple thanks is fine..

Edited by leloush

Share this post


Link to post
Share on other sites
  • 0

^ this is only for ygg. but if i got Box of Thunder Box, Yggseed Box, Speed pot Box,etc.,

can u make a Overweight detection? if ur Overweight u cant open boxes. :)

Share this post


Link to post
Share on other sites
  • 0

^ this is only for ygg. but if i got Box of Thunder Box, Yggseed Box, Speed pot Box,etc.,

can u make a Overweight detection? if ur Overweight u cant open boxes. :)

wee :D im lack of knowledge. to squeeze the script and put alot of items that u want to be checked.

 

 

ok, u can try doing this until someone will give a better script

 

 

duplicate the script in the same .txt so less npc.txt to read

 

add this and change,

[cbox]function script seedbox {[/cbox]

 

change this depending on the items that are in the attached box

[cbox] setarray .@item[0],607;

setarray .@quantity[0],500;

setarray .@returnit[0],"box id"; <-Remove qoutations.

[/cbox]

 

and last is in item script 

[cbox]{ callfunc "seedbox"; },{},{}[/cbox]

 

and so on and so forth for the rest box..

 

that's what im doing if i want to add more box to check.. just wait for someone to provide a better script than this unoptimized one..

Edited by leloush

Share this post


Link to post
Share on other sites
  • 0

function    script    boxweight    {  //callfunc("boxweight",ItemID,Quantity,BoxID)if (checkweight(atoi(getarg(0)),atoi(getarg(1)))){    getitem atoi(getarg(0)),atoi(getarg(1));}else{    getitem atoi(getarg(2)),1;}end;}
Replace spaces with tab,(And suddenly i realize, i cant type tab button in mobile)

Usage: on item script, put

callfunc("boxweight",ItemID,Quantity,BoxID)

And only change itemid,quantity and boxid,

 

P.s:added atoi since many here put quotes.

Edited by Dastgir Pojee

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.