Jump to content

char_has_item?


Thralni

Recommended Posts

It is not difficult with a loop:

 

Code:
i = 0;j = 1;while (i < 499) {  if (j==1)    i = 17;  if (j==2)    i = 32;  if (j==3)    i = 74;   if (j==4)    i = 500;   take_num_of_item(i,200);   j = j + 1;}
This will pretty much take all of (or at least 200 of) items 17, 32, and 74. Just add more conditionals for items you want to take.
Link to comment
Share on other sites

Thought about it a little bit more and this method would be better for grouped items. That's what I get for being so hasty:

 

Code:
i = 220;while (i <= 238) {   take_num_of_item(i,200);   i = i + 1;}
This takes all items between 220 and 238, i.e. all the potions. If you want to take items individually, it is best just to use the take_num_of_item() with the number you want directly.
Link to comment
Share on other sites

I want the party to keep potions that will only harm them (like searing balm). thanks anyway. God, these loops, I never used them, but they are so handy! Thanks for showing me them!

 

Another question: I made a custom special ability, but I don't know what th game will do with it. The ability shouldn't be there immeditaly when the scenario starts, they should get it at some point, but I don't know if the gmae automatically ives it or not. then something else, how do i give it? for now i just did set_char_trait(0,0,1), but i don't know if that's correct. i looked in the docs and other scenario's, but didn't find what i needed.

Link to comment
Share on other sites

If you want to take away most of the helpful potions, set the top limit to 241 on the while loop.

 

I never personally mucked with special abilities, I intend to, just never got around with it. Most of TMs scenarios and Bahssikava have them I know. Take a look at their main scenario script file.

Link to comment
Share on other sites

Yes, i was thinking about that too. Isn't it better to use take_all_item?

 

I already looked in bahs's scenario script, but couldn't find it. Anyway, now kelandon told me where to look, I'll figure it out soon enough. I looked at change_custom_abil_uses, but i thought it was only for changing how many times the party can still use the thing. i suppose it will work lime this (tell me if I'm wrong): In the beginning, you set it to 0, so the party can't use it. later, you set it to a large number, say 200, so the party cn use it all the time. Am i right?

Link to comment
Share on other sites

It defaults to 0. You don't have to set it to 0.

 

When they're supposed to get the ability, set their uses to, say, 1.

 

Then, in the state that gets called when they use the ability, set the uses of the character who used the ability back to 1. (That is, if the ability is ability number 1, for example, the first line of the ability state should be

Code:
 change_custom_abil_uses(who_used_custom_abil(),1,1); 
All of Bahs's abilities work like this.
Link to comment
Share on other sites

Thanks kelandon.

 

i got an email back from jeff about the graphics, saying to download the most recent version, and see what happens next. i did that, thereby deleting all my save files. that's not so bad, actually, thanks to kelandon's high party maker. otherwise I would have been mad, yes. Anyway, i installed it, but the game was immediatly registered. is this normal?

 

EDIT: oh yes, when i tried to install the update to version 1.1.2, the updater said it couldn't install, because the graphics and some other files were corrupt. Could this have been the reason for my graphics not to work?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...