Question.

04/02/2011 02:21 [DEV]Harmony#1
Alright I suck when it comes to SQL Scripts,

Lets say I'll make an npc which is selling candies in a certain map, lets say at undo stadium.
So as long as you stay in Undo you'll have that candie, but when you change the map, the item gets deleted in the database

Is it possible to write a script like that?

Thanks. :)
04/03/2011 03:46 freeskier4lif3#2
Oh Hai! I guess we talked about this on msn today, so I don't need to answer you here.
04/04/2011 06:02 ihaxx#3
dont think its possible to check items on different maps.
whats about u give the candy a time till it delete it by itself ( e.g. the exp ammulets with 15 day ) so make your candy for like 10 sec so that u only can use it fast.
04/04/2011 06:24 Decima#4
unfortunately, the databased isnt called at all when changing maps, so there is no way to do anything during that process in an sql script. so unless is can be scripted into the exe somehow, im afraid the answer is no.
04/04/2011 15:49 [DEV]Harmony#5
Quote:
Originally Posted by Decima View Post
unfortunately, the databased isnt called at all when changing maps, so there is no way to do anything during that process in an sql script. so unless is can be scripted into the exe somehow, im afraid the answer is no.
Not really when changing maps, but you know as soon as the map is done loading the map changes in the user_tbl. So lets say the candies are only allowed in map 50, and as soon as the map changes in user_tbl the item gets deleted.

Even though another reason why its not possible, you have to be logged out when items get deleted through the database.

Anyways thanks for your answer.
04/04/2011 21:46 BioNicX#6
yes its possible if you have two databases, but hell lot of query to write to get your client to use them two lol.
04/04/2011 22:31 ҉ THT ҉#7
you can do it with jobs :)
DELETE ITEM IF MAPINDEX IS NOT ....
04/05/2011 00:02 [DEV]Harmony#8
As I said, you can do it. But no point because the people would have to log out that the item gets deleted, the item can't be deleted while anyone is ingame.
04/05/2011 00:05 BioNicX#9
Quote:
Originally Posted by [DEV]Harmony View Post
As I said, you can do it. But no point because the people would have to log out that the item gets deleted, the item can't be deleted while anyone is ingame.
what i ment is not deleted, i ment script that will use two databases.
04/05/2011 00:14 [DEV]Harmony#10
Why would you use two databases? Useless, lol.
04/05/2011 00:17 BioNicX#11
Quote:
Originally Posted by [DEV]Harmony View Post
Why would you use two databases? Useless, lol.
i mean script will pull out those items u want from that new database when your on that map, then when you move map , that script will change back to original one.