DemonChuck Posted August 3, 2015 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 61 Reputation: 0 Joined: 10/14/12 Last Seen: April 23, 2022 Share Posted August 3, 2015 - script kill_event -1,{ OnNPCKillEvent: getmapxy.@map$,.@x,.@y,0; // symbol of brave warrior if(getmonsterinfo(killedrid,MOB_MVPEXP) && .@map$!= "pvp_n_1-5" && .@map$!= "pvp_n_2-5" && .@map$!= "pvp_n_3-5" && .@map$!= "pvp_n_4-5" && .@map$!= "pvp_n_5-5") { set .@rand, rand(1,200); if(.@rand <= 40) { announce "Player " +strcharinfo(0) +" got [Event Ticket]!",0,0xD462FF; getitem 7711,1; } if(.@rand <= 5) { query_sql "SELECT ID FROM item_db a WHERE a.`id` BETWEEN 19100 AND 19115 ORDER BY RAND() LIMIT 1",.@item_id; getitem .@item_id,1; announce "Player " +strcharinfo(0) +" got "+getitemname(.@item_id)+"!",0,0xD462FF; } end; } } Requesting will read the import > item_db not the sql_item_db if(.@rand <= 5) { query_sql "SELECT ID FROM item_db a WHERE a.`id` BETWEEN 19100 AND 19115 ORDER BY RAND() LIMIT 1",.@item_id; getitem .@item_id,1; cause my costume is in import item_db bump bump Quote Link to comment Share on other sites More sharing options...
Emistry Posted August 14, 2015 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted August 14, 2015 why not just execute all your sql query into the item_db table ?? Quote Link to comment Share on other sites More sharing options...
Question
DemonChuck
Requesting will read the import > item_db
not the sql_item_db
if(.@rand <= 5) {
query_sql "SELECT ID FROM item_db a WHERE a.`id` BETWEEN 19100 AND 19115 ORDER BY RAND() LIMIT 1",.@item_id;
getitem .@item_id,1;
cause my costume is in import item_db
bump
bump
Link to comment
Share on other sites
1 answer 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.