Please help me with this script, im new in sql query. what i wanted to do is to summon different monster per level in devil square. like
level 1 :
set .monsterset, query_sql("SELECT id, iname, hp FROM `mob_db` where LV <= 30 and LV >= 50 and hp < 500000 and MEXP = 0 and not iName='Treasure Chest' ORDER BY RAND() LIMIT 100", .monsterid, .monstername$, .monsterhp);
for (set .@x,0; .@x<getmapusers("ordeal_1-1"); set .@x, .@x+1){
set .monstercount,15;
for (set .@y,0; .@y<.monstercount; set .@y, .@y+1 ) {
set .monster, rand(0,.monsterset-1);
monster "ordeal_1-1",149,149,"[DS] "+.monstername$[.monster],.monsterid[.monster],.monstercount,strnpcinfo(0)+"::OnDevilDead";
set .mob, .mob+.monstercount;
}
}
Level 2:
set .monsterset, query_sql("SELECT id, iname, hp FROM `mob_db` where LV <= 51 and LV >= 70 and hp < 500000 and MEXP = 0 and not iName='Treasure Chest' ORDER BY RAND() LIMIT 100", .monsterid, .monstername$, .monsterhp);
for (set .@x,0; .@x<getmapusers("ordeal_1-1"); set .@x, .@x+1){
set .monstercount,15;
for (set .@y,0; .@y<.monstercount; set .@y, .@y+1 ) {
set .monster, rand(0,.monsterset-1);
monster "ordeal_1-1",149,149,"[DS] "+.monstername$[.monster],.monsterid[.monster],.monstercount,strnpcinfo(0)+"::OnDevilDead";
set .mob, .mob+.monstercount;
}
}
Somehow I get error. debug
: DB error - Can't create/write to file '\tmp\#sql_2180_0.MYI' (Errcode: 2)
[Debug]: at Hercules\src\map\script.c:15851 - SELECT id, iname, hp FROM `mob_db` where LV <= 30 and LV >= 50 and hp < 500000 and MEXP = 0 and not iName='Treasure Chest' ORDER BY RAND() LIMIT 100
[Debug]: Source (NPC): MVP Grave at prontera (170,181)
Hello!
Please help me with this script, im new in sql query.
what i wanted to do is to summon different monster per level in devil square.
like
level 1 :
Level 2:
Somehow I get error. debug
Share this post
Link to post
Share on other sites