I know it's been in existence since forever and there are a few other ones posted online, but I'm trying to make one from scratch.
I know it's no big dealz and a lame script or whatever, but If anyone could help me out that would be sweeet and greatly appreciated. :')
Pretty much what I want is for it to require 1 steel per repair. But it will do it all in one swoop with a repairall; instead of a menu or one by one.
It will display the amount of broken IDs in your inventory.
And from there it will delete the correct amount of steel needed for repairs.
My problem is (basically, I'm still a noob at all this) that I can't seem to set arrays right or whatever.
Or maybe I'm going about this in a totally wrong way.
Here's what I have so far:
set .@id, 999;
set .@repaircount, countitem(getbrokenid(1));
set .@steelcount, countitem(999);
mes "[ ^0065DFBlair^000000 ]";
mes "To repair gears; I need ^666666steel^000000.";
mes "That's one steel per repair.";
mes " ";
mes "You have ^FF0000"+.@repaircount+"^000000 broken items.";
mes "You have ^FF0000"+.@steelcount+"^000000 steel.";
menu "Continue.",-,"Nevermind.",norepair;
next;
if(getbrokenid(1) == NULL) goto allgood;
if(!countitem(.@id)) goto needsteel;
delitem .@id,.@repaircount;
while (getbrokenid(1))
{
repairall;
set .@i, .@i +1;
}
if (.@i) dispbottom .@i + " items have been successfully repaired.";
specialeffect2 101;
end;
allgood:
next;
mes "[ ^0065DFBlair^000000 ]";
mes "All your items are ^669933intact^000000.";
end;
needsteel:
next;
mes "[ ^0065DFBlair^000000 ]";
mes "You ^FF0000don't have^000000 steel.";
end;
norepair:
end;
I'm thinking the reds are my problem areas. Like, maybe I can't just count items of the broken IDs, and rather should be using some inventory list script instead.
I've looked at some getinventorylist scripts but I can't seem to grasp it. :0
Anyway, any input is super appreciated. Thanks a bunch in advance if anyone helps.
Question
Eyjafjallajokull
I know it's been in existence since forever and there are a few other ones posted online, but I'm trying to make one from scratch.
I know it's no big dealz and a lame script or whatever, but If anyone could help me out that would be sweeet and greatly appreciated. :')
Pretty much what I want is for it to require 1 steel per repair. But it will do it all in one swoop with a repairall; instead of a menu or one by one.
It will display the amount of broken IDs in your inventory.
And from there it will delete the correct amount of steel needed for repairs.
My problem is (basically, I'm still a noob at all this) that I can't seem to set arrays right or whatever.
Or maybe I'm going about this in a totally wrong way.
Here's what I have so far:
Link to comment
Share on other sites
2 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.