• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.2 Promotion NPC. How to check if he have storage

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
993
Solutions
5
Reaction score
55
Hello so im trying to make an npc that sets you from character id 1 to for example to character id 2, and i want to make player to kill monster X and only then he be able to achieve that new character, but dunno how to make that storage check if he have X storage. So im using this in my monster

<charactermission needStorage="1000" needValue="49"/>
so as you can see he need storage 49 or 1000 dont rly understand :D to be able to attack this monster, but w/e since it works. So after he kills this monster this is where we go \/

and this is in my creature script code

['Promotion monster'] = {needValue = 49, setValue = 50,
So here you see if he killed that monster he gets setValue = 50 so this is when he would be able to talk with that promotion npc and get his new character. So this is the problem dont know how to make that check if playerstorage = 50 (I guess its 1050?) npc sets him to that new character ID 2. So i got npc that might work how i want. It only need that storage checks i commented

This is NPC trying to edit

So im pretty sure we gonna need to add lib/custom/storages to make that check if hes after this power quest or not?
Post automatically merged:

And forgot to mention need extra more function to check if he have items with id X if not he dont allow to change the character
 
Last edited:
Back
Top