Hello, I'm trying to make a dynamic quest shop(Don't want to take a already made script), but I'm having a little trouble by making the getd get the right value.
function x {
[...]
setarray .@j[0],535,1,536,1;
copyarray getd(".q_"+getarg(0)+"[0]"),.@j[0],getarraysize(.@j); // beeing getarg(0) = 535
[...]
}
OnBuyItem:
[...]
for(set .@i,2; .@i < getarraysize(getd(".q_"+@bought_nameid+"")); set .@i,.@i + 2) {
mes ""+getd(".q_"+@bought_nameid+"["+.@i+"+2]")+"x "+getitemname(getd(".q_"+@bought_nameid+"["+.@i+"+1]")); // Beeing @bought_nameid = 535
}
[...]
So the problem is that it dosen't get the values of [3] and [4], only from [0]. Instead of beeing 1x Ice Cream(536) it's 535x Pumpkins.(OnBuyItem).
Question
BRDominik
Hello, I'm trying to make a dynamic quest shop(Don't want to take a already made script), but I'm having a little trouble by making the getd get the right value.
So the problem is that it dosen't get the values of [3] and [4], only from [0]. Instead of beeing 1x Ice Cream(536) it's 535x Pumpkins.(OnBuyItem).
Any help is welcome.
Edited by BRDominikLink to comment
Share on other sites
7 answers 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.