I've shorten the script for better viewing, how can I make this script choose what is on my inventory instead of choosing in the menu. Also Instead of paying coin(20000) i would like to change the requirement on what i choose on my inventory, for example, i choose Anniversary Hat on my inventory therefore the item will be deleted after its done.
Quote
L_top: // Top Headgears
mes "[Premium Disguise]";
mes "Which one do you want?";
menu "1. 2nd Anniversary Hat",t1,"Nevermind",L_end;
next;
L_mid: // Middle Headgears
mes "[Premium Disguise]";
mes "Which one do you want?";
menu "Nevermind",L_end;
next;
L_lower: // Lower Headgears
mes "[Premium Disguise]";
mes "Which one do you want?";
menu "Nevermind",L_end;
next;
L_reset:
set hastop,0;
set hasmid,0;
set haslow,0;
mes "[Premium Disguise]";
mes "Options have been reset.";
L_end:
close;
S_GetHeadgear:
// getarg(0) = type ("top", "mid", or "low")
// getarg(1) = cost in Reward Coins
// getarg(2) = "item name"
// getarg(3) = view_id
if (getd("#"+getarg(0)+getarg(3)) < 1) {
mes "[Premium Disguise]";
mes "Sorry, you have not yet purchased or unlocked this headgear.";
mes "Would you like to purchase access to it for "+getarg(1)+" Reward Coins?";
next;
if (select("Yes:No")==2) close;
else if (countitem(20000) < getarg(1)) {
mes "[Premium Disguise]";
mes "Sorry, you don't have enough coins. Come back when you do!";
close;
}
mes "[Premium Disguise]";
mes "Alright, thank you! You can now access the "+getarg(2)+" headgear.";
delitem 20000,getarg(1);
setd "#"+getarg(0)+getarg(3),1;
}
setd "has"+getarg(0),1;
setd "premium"+getarg(0),getarg(3);
if (getarg(0) == "top") changelook 4,getarg(3); // LOOK_HEAD_TOP
else if (getarg(0) == "mid") changelook 5,getarg(3); // LOOK_HEAD_MID
else if (getarg(0) == "low") changelook 3,getarg(3); // LOOK_HEAD_BOTTOM
mes "[Premium Disguise]";
mes "New disguise applied to "+getarg(0)+" headgear.";
close;
OnPCLoginEvent:
if (hastop) changelook 4,premiumtop;
if (hasmid) changelook 5,premiummid;
if (haslow) changelook 3,premiumlow;
end;
}
Question
xG000000
I've shorten the script for better viewing, how can I make this script choose what is on my inventory instead of choosing in the menu. Also Instead of paying coin(20000) i would like to change the requirement on what i choose on my inventory, for example, i choose Anniversary Hat on my inventory therefore the item will be deleted after its done.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.