ThyroDree 3 Posted March 7, 2014 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? Quote Share this post Link to post Share on other sites
0 leloush 7 Posted March 7, 2014 (edited) Script [cbox]function script checkweight {setarray .@item[0],607; <- Yggsetarray .@quantity[0],500; <- Quantitysetarray .@returnit[0],501; <- Change it to itemid Yggdrasil boxif( 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 March 7, 2014 by leloush 1 ThyroDree reacted to this Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 7, 2014 is this auto direct on storage? Quote Share this post Link to post Share on other sites
0 leloush 7 Posted March 7, 2014 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. Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 7, 2014 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 ^ Quote Share this post Link to post Share on other sites
0 leloush 7 Posted March 7, 2014 (edited) np, glad to help.. honeslty i dont reps since im not pro like them ^ just a simple thanks is fine.. Edited March 7, 2014 by leloush Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 7, 2014 ^ 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. Quote Share this post Link to post Share on other sites
0 leloush 7 Posted March 7, 2014 (edited) ^ 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 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 March 7, 2014 by leloush Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted March 7, 2014 (edited) 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 March 7, 2014 by Dastgir Pojee Quote Share this post Link to post Share on other sites
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