Guest Posted May 23, 2009 Share Posted May 23, 2009 first sorry for my bad english,question1…Hey how i can do that every one can pickup a item on the map 1 time.I mean, When i am editing the map, i place a item, but i want that this item don't come back if it picked up be any one, and every one can take this item 1 time.question2...I place a npc on the map, but i want that if he is killed by any one, it comes not back.And every one can kill him one time.Plz help me if it can... Link to comment Share on other sites More sharing options...
Patrick Posted May 23, 2009 Share Posted May 23, 2009 question one.source edit a scripted tile to make it drop an item every 100000000 etc seconds.question 2in the npc editor it says respawn time. set that to the max!happy times. Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 23, 2009 Share Posted May 23, 2009 A better way to do it, is to store things in inis using PutVar and GetVar.So it checks to see if the player already picked up the item in the ini.Here's the pseudo(scripted tile):If GetVar("stuff.ini", player's name, "item") = "" Then Give Player Item PutVar("stuff.ini, player's name, "item", 1) ReturnElse Print: You already took this item! ReturnEnd IfFor the other one, you could probably do something like this.On the OnNpcDeath, do something like this:Call Putvar("stuff.ini", player's name, npc's number, 1)Then, on the OnAttack, something like,If GetVar("stuff.ini", player's name, npc's number) <> "" Then Print: You already killed this NPC Exit SubEnd If Link to comment Share on other sites More sharing options...
Guest Posted May 24, 2009 Share Posted May 24, 2009 Thanks…. ;) :cheesy:Like the script. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now