danielps Posted December 18, 2016 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 174 Reputation: 18 Joined: 10/09/14 Last Seen: 7 hours ago Share Posted December 18, 2016 Hello guys, I'm coming from cronus, and i'm with some problens in my src modifications i did in cronus... I can't do it in rathena cause src is kind of different here, could someone help me please? There is a command areawarp right? in cronus i only duplicated it and changed somethings and create tha "areakill" Same work: map,x1,y1,x2,y2 Its kind of easy, coudl someone who is good with src manipulating help me please? Thanks a lot!! Quote Link to comment Share on other sites More sharing options...
1 Tokei Posted December 18, 2016 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 696 Reputation: 721 Joined: 11/12/12 Last Seen: Wednesday at 04:09 PM Share Posted December 18, 2016 Well it's pretty straightforward: //script.c static int buildin_areakill_sub(struct block_list *bl,va_list ap) { status_kill(bl); return 0; } BUILDIN_FUNC(areakill) { const char *mapname; int16 m; int x0, y0, x1, y1; mapname = script_getstr(st,2); if ((m = map_mapname2mapid(mapname)) < 0) return SCRIPT_CMD_FAILURE; x0 = script_getnum(st,3); y0 = script_getnum(st,4); x1 = script_getnum(st,5); y1 = script_getnum(st,6); map_foreachinarea(buildin_areakill_sub,m,x0,y0,x1,y1,BL_MOB); // If you want to kill players as well, add BL_PC: //map_foreachinarea(buildin_areakill_sub,m,x0,y0,x1,y1,BL_MOB|BL_PC); return SCRIPT_CMD_SUCCESS; } // def BUILDIN_DEF(areakill,"siiii"), I'm not sure if you wanted to kill mobs or players, or both. 1 Quote Link to comment Share on other sites More sharing options...
0 danielps Posted December 18, 2016 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 174 Reputation: 18 Joined: 10/09/14 Last Seen: 7 hours ago Author Share Posted December 18, 2016 (edited) 3 hours ago, Tokei said: Well it's pretty straightforward: //script.c static int buildin_areakill_sub(struct block_list *bl,va_list ap) { status_kill(bl); return 0; } BUILDIN_FUNC(areakill) { const char *mapname; int16 m; int x0, y0, x1, y1; mapname = script_getstr(st,2); if ((m = map_mapname2mapid(mapname)) < 0) return SCRIPT_CMD_FAILURE; x0 = script_getnum(st,3); y0 = script_getnum(st,4); x1 = script_getnum(st,5); y1 = script_getnum(st,6); map_foreachinarea(buildin_areakill_sub,m,x0,y0,x1,y1,BL_MOB); // If you want to kill players as well, add BL_PC: //map_foreachinarea(buildin_areakill_sub,m,x0,y0,x1,y1,BL_MOB|BL_PC); return SCRIPT_CMD_SUCCESS; } // def BUILDIN_DEF(areakill,"siiii"), I'm not sure if you wanted to kill mobs or players, or both. Thanks a lot bro !! I'll teste it right now ! And one more question, i'm TI student in colege, i'm very good with script, i know the basic of struct, pointers.... But, how can i lear fast about src? Don't wanna wait others helpe me, I want to be good like you and make my own modifications and help others as you do =/ Any tips or advice? Thanks again, like ! @edit [Warning]: Unexpected type for argument 1. Expected string. [Debug]: Data: variable name='prontera' index=0 [Debug]: Function: areakill [Debug]: Source (NPC): Teste Comando at prontera (149,210) [Debug]: (map_mapname2mapid) mapindex_name2id: Map "0" not found in index list! [Debug]: Source (NPC): Teste Comando at prontera (149,210) I did it right, i recompiled, all right no erros, and in my script test got that error in log.. my script: areakill prontera,153,206,158,210; close; @edit 2 Editting again, i was using it wrong sorry hehe now i set -> areakill "prontera" and it worked 100% !! Thankkss broo !! Now could you just answer my last question i did before about learnig src? And another point, when i use areakill command, i get this in log: [Warning]: npc_event: player's event queue is full, can't add event 'DeathArena::OnPCDieEvent' ! [Warning]: npc_event: player's event queue is full, can't add event 'Poring Bomba::OnPCDieEvent' ! any idea? Edited December 19, 2016 by danielps Quote Link to comment Share on other sites More sharing options...
Question
danielps
Hello guys,
I'm coming from cronus, and i'm with some problens in my src modifications i did in cronus...
I can't do it in rathena cause src is kind of different here, could someone help me please?
There is a command areawarp right? in cronus i only duplicated it and changed somethings and create tha "areakill"
Same work: map,x1,y1,x2,y2
Its kind of easy, coudl someone who is good with src manipulating help me please?
Thanks a lot!!
Link to comment
Share on other sites
2 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.