QQfoolsorellina Posted November 3, 2012 Posted November 3, 2012 (edited) *monster2 "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}; "<event label>" paramater : no longer work with size or ai and should check if it's a event name <size> paramater: 0(small size), 2(MEDIUM size), 4(big size) <ai> paramater: if value 1 , active the summoned mob ai mode Edited November 5, 2012 by QQfoolsorellina Quote
Euphy Posted November 3, 2012 Posted November 3, 2012 I think the default 'monster' command should be structured like this, tbh. Quote
GmOcean Posted November 4, 2012 Posted November 4, 2012 I agree, the default monster command should be structured like this. As it is all mobs listed in Mob_db have the same number of columns. So i could effectively summon a Fabre as an MVP so to speak. Quote
lekkereten Posted November 4, 2012 Posted November 4, 2012 Could you please test this patch that I've done? The syntax should work like: *monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,<size>, <ai>, "<event label>"}; <size>: 0=small, 1=medium, 2=big <ai>: 0=off, 1=on There should be no trouble compiling, since I did it myself and got no errors nor warnings. However I can't test at the moment, which is why I asked you to do so. Patch: monster_size_ai.patch Quote
Euphy Posted November 5, 2012 Posted November 5, 2012 It'd work better as: *monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}; For backwards compatibility. :> Quote
lekkereten Posted November 5, 2012 Posted November 5, 2012 Sure. Can someone try to say if its working? I can only do that tomorrow. New patch with unsigned type vars and syntax proprosed by OP and Euphy. monster_size_ai_syntax_nwe.patch Quote
QQfoolsorellina Posted November 5, 2012 Author Posted November 5, 2012 (edited) Sure. Can someone try to say if its working? I can only do that tomorrow. New patch with unsigned type vars and syntax proprosed by OP and Euphy. monster_size_ai_syntax_nwe.patch thank for your mode , but after tested it doesn't work for me as you mention <size>: 0=small, 1=medium, 2=big ,but autually 0 = medium ,1=small,2= big *monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}; I feel something wrong about this part + if( script_hasdata(st,9) ) + { + if( ( size = script_getnum(st,8) ) > 3 ) + { + ShowWarning("buildin_monster: Invalid size %u while spawning monster class %d\n", size, class_); + return 1; + } + } + + if( script_hasdata(st,10) ) + { + if( ( ai = script_getnum(st,9) ) > 1 ) + { + ShowWarning("buildin_monster: Invalid ai %u while spawning monster class %d\n", ai, class_); + return 1; + } + } and BUILDIN_DEF(monster,"siisii?*"), I'd deeply appreciate the example , now I know how to create the needed monster script command. Edited November 5, 2012 by QQfoolsorellina Quote
lekkereten Posted November 5, 2012 Posted November 5, 2012 OH f*ck me I totally forgot that. And sorry for the mistakes, I did the parameter modification in a hurry. Hmm, I thought the sizes were right, I was using this as my reference: enum size { SZ_SMALL = 0, SZ_MEDIUM, //1 SZ_BIG, //2 }; @edit Should work. monster_patch.patch And you should suggest this as the official behavior, it's a great idea Quote
Question
QQfoolsorellina
*monster2 "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>};
"<event label>" paramater : no longer work with size or ai and should check if it's a event name
<size> paramater: 0(small size), 2(MEDIUM size), 4(big size)
<ai> paramater: if value 1 , active the summoned mob ai mode
Edited by QQfoolsorellina7 answers 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.