Angelmelody
Members-
Content Count
772 -
Joined
-
Last visited
-
Days Won
23
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Angelmelody
-
skill_require_db.txt 258,0,0,24:28:32:36:40:44:48:52:56:60,0,0,0,4:5,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 change into 258,0,0,24:28:32:36:40:44:48:52:56:60,0,0,0,4,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2: One-handed swords 3: Two-handed swords 4: One-handed spears 5: Two-handed spears 6: One-handed axes 7: Two-handed axes
-
Don't show last zero in weight (npc dialogue box)?
Angelmelody replied to Helena's question in Script Support
not sure, but you can try.... .@amount = query_sql ("SELECT ID, (weight/10), attack, defence, slots, equip_level FROM item_db WHERE name_japanese = '"+ escape_sql(.@itemname$) +"'", @iid, .@weight$, .@attack, .@defence, .@slots, .@elvl); mes "Weight: "+.@weight$; //--> maybe it can show float -
you don't need freeloop if you have used sleep2 inside the while loop and sleep2 can check if the invoked player was online or not ,and player should be checked while( slppe2(200) && .@currentMap$ == .@onMap$ ) { for( .@i = 1; .@i <= 20; .@i++ ) { for( .@j = 0; .@j < getarraysize( .restrictedItemIds ); .@j++ ) { if ( getequipid( .@i ) == .restrictedItemIds[ .@j ] ) { unequip( .@i ); dispbottom( "Equipment " + getitemname( .restrictedItemIds[ .@j ] ) + " is not permitted on map " + .@onMap$ + ". It has been stripped." ); } } } getmapxy( .@currentMap$, .@x, .@y, 0 ); }
-
Enabling #main when logging in
Angelmelody replied to snowflake1963's question in Client-Side Support
http://herc.ws/board/topic/8648-automatic-join-main/ -
the .mobarray array range is 0~ 13 and you choose 15 --> @menu=15 .mobarray[@menu-1] ---> .mobarray[14] = null it should be atcommand "@summon " + .mobarray[.@i] + " 60";
-
mid = monster idn/100% chance --> n/10000 100% ===> n = 10000
-
bonus3 bAddClassDropItem,item id,mid,n; Adds a n/100% chance of dropping item id when killing monster mid
-
dunno if these mapflags work for mob unit? map_zone_db.conf mapflags: ( "weapon_damage_rate 60", "magic_damage_rate 60", "misc_damage_rate 60", "long_damage_rate 70", "short_damage_rate 80", )
-
Can someone help me with a check on a job?
Angelmelody replied to Aeromesi's question in Script Support
if you want any mage type class to be effected ,you can use BaseClass +(eaclass(EAJ_MAGE?"":"SP Rec"))+ change into +(BaseClass == EAJ_MAGE ?"":"SP Rec"))+ -
example: prontera,154,175,5 script testtestest 1002,{ set .@id,instance_create("prt dup02",0,IOT_NONE); instance_attachmap("prontera", .@id,1,"prontera02"); instance_init .@id; warp "prontera02",154,166;}
-
And then you have to comment out the gvg mapflag of guild_vs1
-
Anybody got a tool to remove this column
Angelmelody replied to mleo1's question in Database Support
Here is Gepard's online convert tool ,I think it should work http://dev.gepard.kdr.net.pl/r15531/ -
No reason to use $global variables, just add OnInit label with defaulting those values. the only reason is those variables will be change by gm and not every gm can modify that script
-
to use global permanent variables($prefix) instead of npc variables(. prefix)
-
No offence, for my experience soon = dead
-
use this script command http://herc.ws/board/topic/4593-getmemberaid-checkmes/ then - script test777 -1,{OnPCLoadMapEvent: if(strcharinfo(3) =="event_wroom" && getmapusers("event_wroom") >= 10 && !$@gamerunning ) { $@gamerunning = 1; //--->when the event end , remember to set this varaible to 0; mapannounce "event_wroom", "Event is about to start in 3 seconds.",0; sleep2 1000; mapannounce "event_wroom", "3",0; sleep2 1000; mapannounce "event_wroom", "2",0; sleep2 1000; mapannounce "event_wroom", "1",0; sleep2 1000; mapannounce "event_wroom", "Let's get it on!",0; getmemberaid ALL_SAMEMAP, "event_wroom"; freeloop(1); for( .@i = 0; .@i < $@onlinecount; .@i++ ) { if( attachrid($@onlineaid[.@i]) && strcharinfo(3) == "event_wroom" && checkvending() ) { atcommand "@kick "+strcharinfo(0); } } freeloop(0); $@onlinecount = 0; deletearray $@onlineaid; donpcevent "event_quest::OnStart"; } end;OnInit: setmapflag "event_wroom", mf_loadevent;} already tested , it was working fine for me @@Angelmelody Thank you for this. anyway I just tested it but it still doesn't kick vendors :/ do you think vendors on auto trade mode cannot be kicked using an npc script? I tried this script and clicked the npc.. It announces the char name of the vendors on the map but doesn't kick them.. event_wroom,34,157,4 script kickertest 100,{ getmemberaid ALL_SAMEMAP, "event_wroom"; freeloop(1); for( .@i = 0; .@i < $@onlinecount; .@i++ ) { if( attachrid($@onlineaid[.@i]) && strcharinfo(3) == "event_wroom" && checkvending() ) { atcommand "@kick "+strcharinfo(0); mapannounce "event_wroom", strcharinfo(0),0; } } freeloop(0); $@onlinecount = 0; deletearray $@onlineaid; end;} try 'detachrid' then kick the 'rid2name( $@onlineaid[.@i])' , I think it should work on @AT state vendors event_wroom,34,157,4 script kickertest 100,{ getmemberaid ALL_SAMEMAP, "event_wroom"; freeloop(1); for( .@i = 0; .@i < $@onlinecount; .@i++ ) { if( attachrid($@onlineaid[.@i]) && strcharinfo(3) == "event_wroom" && checkvending() ) { mapannounce "event_wroom", rid2name( $@onlineaid[.@i]),0; detachrid; atcommand "@kick "+rid2name( $@onlineaid[.@i]); } } freeloop(0); $@onlinecount = 0; deletearray $@onlineaid; end;}
-
Forgot to say, the appearance of head gear will dispear when you relogin,coz your headgear appearance will load costume appearance again,so you have to make your non-appearance costume to show normal headgear. OnEquipScript: <" callfunc("test123", 1024); "> function script test123 { if(!set(.@pos, getarg(0,0))) return; if(.@pos&(1024|2048|4096)) { if(.@pos&1024) { .@cp = EQI_HEAD_TOP; .@lp = LOOK_HEAD_TOP; } else if ( !(.@pos&1024) && .@pos&2048) { .@cp = EQI_HEAD_MID; .@lp = LOOK_HEAD_MID; } else if (!(.@pos&1024) && !(.@pos&2048) && .@pos&4096) { .@cp = EQI_HEAD_LOW; .@lp = LOOK_HEAD_BOTTOM; } .@rlook = getiteminfo(getequipid(.@cp),11); changelook .@lp, .@rlook; }}
-
use this script command http://herc.ws/board/topic/4593-getmemberaid-checkmes/ then - script test777 -1,{OnPCLoadMapEvent: if(strcharinfo(3) =="event_wroom" && getmapusers("event_wroom") >= 10 && !$@gamerunning ) { $@gamerunning = 1; //--->when the event end , remember to set this varaible to 0; mapannounce "event_wroom", "Event is about to start in 3 seconds.",0; sleep2 1000; mapannounce "event_wroom", "3",0; sleep2 1000; mapannounce "event_wroom", "2",0; sleep2 1000; mapannounce "event_wroom", "1",0; sleep2 1000; mapannounce "event_wroom", "Let's get it on!",0; getmemberaid ALL_SAMEMAP, "event_wroom"; freeloop(1); for( .@i = 0; .@i < $@onlinecount; .@i++ ) { if( attachrid($@onlineaid[.@i]) && strcharinfo(3) == "event_wroom" && checkvending() ) { atcommand "@kick "+strcharinfo(0); } } freeloop(0); $@onlinecount = 0; deletearray $@onlineaid; donpcevent "event_quest::OnStart"; } end;OnInit: setmapflag "event_wroom", mf_loadevent;} already tested , it was working fine for me
-
HELP! My old 3ceam src to latest Hercules
Angelmelody replied to Neferpitou's question in Source Support
I did convert by hand but not test .... good luck Index: chat.c===================================================================--- chat.c (revision 14682)+++ chat.c (working copy)@@ -377,3 +377,17 @@ return 0; }++/// Kicks a user from the chat room.+int chat_npckickchat(struct chat_data* cd, const char* kickusername)+{+ int i;+ nullpo_ret(cd);++ ARR_FIND( 0, cd->users, i, strncmp(cd->usersd[i]->status.name, kickusername, NAME_LENGTH) == 0 );+ if( i == cd->users )+ return -1;++ chat->leave(cd->usersd[i],1);+ return 0;+} No newline at end of fileIndex: chat.h===================================================================--- chat.h (revision 14682)+++ chat.h (working copy)@@ -36,4 +36,5 @@ int chat_disableevent(struct chat_data* cd); int chat->npc_kick_all(struct chat_data* cd); +int chat_npckickchat(struct chat_data* cd, const char* kickusername); #endif /* _CHAT_H_ */Index: script.c===================================================================--- script.c (revision 14682)+++ script.c (working copy)@@ -3461,6 +3461,10 @@ } } + + ++ if(st->sleep.tick > 0) { //Restore previous script script->detach_state(st, false);@@ -9300,6 +9304,51 @@ return 0; } +/// Kick the specified player from the waiting room of the target npc.+///+/// kickwaitingroomall "<npc_name>", <char_name>;+BUILDIN(waitingroomkick)+{+ struct npc_data* nd;+ struct chat_data* cd;+ const char* char_name;++ nd = npc->name2id(script_getstr(st,2));+ char_name = script_getstr(st,3);++ if( nd != NULL && (cd=(struct chat_data *)map->id2bl(nd->chat_id)) != NULL )+ chat_npckickchat(cd, char_name);+ return 0;+}+++/// Get Users in waiting room and stores gids in .@waitingroom_users[]+/// Num users stored in .@waitingroom_usercount+///+/// getwaitingroomusers "<npc_name>";+BUILDIN(getwaitingroomusers)+{+ struct npc_data* nd;+ struct chat_data* cd;++ int i, j=0;++ if( script_hasdata(st,2) )+ nd = npc->name2id(script_getstr(st,2));+ else+ nd = (struct npc_data *)map->id2bl(st->oid);++ if( nd != NULL && (cd=(struct chat_data *)map->id2bl(nd->chat_id)) != NULL ) {+ for(i = 0; i < cd->users; ++i) {+ script->setd_sub(st, NULL, ".@waitingroom_users", j, (void *)cd->usersd[i]->status.account_id, NULL);+ j++;+ }++ script->setd_sub(st, NULL, ".@waitingroom_usercount", 0, (void *)j, NULL);+ }+ return 0;+}+ /// Enables the waiting room event of the current or target npc. /// /// enablewaitingroomevent "<npc_name>";@@ -14254,6 +14303,28 @@ return 0; } +BUILDIN(getbgmembers)+{+ struct battleground_data *bg = NULL;+ struct map_session_data *sd;+ int bg_id, i, j=0;++ bg_id = script_getnum(st,2);+ if( (bg = bg->team_search(bg_id)) == NULL) {+ script_pushint(st,0);+ return 0;+ }+ for( i = 0; i < MAX_BG_MEMBERS; i++ ) {+ if( (sd = bg->members[i].sd) == NULL )+ continue;+ script->setd_sub(st, NULL, ".@bg_members", j, (void *)sd->status.account_id, NULL);+ j++;+ }+ script->setd_sub(st, NULL, ".@bg_membercount", 0, (void *)j, NULL);++ return 0;+}+ BUILDIN(bg_updatescore) { const char *str;@@ -14924,6 +14995,8 @@ BUILDIN_DEF(waitingroom,"si??"), BUILDIN_DEF(delwaitingroom,"?"), BUILDIN_DEF2(waitingroomkickall,"kickwaitingroomall","?"),+ BUILDIN_DEF(waitingroomkick,"ss"),+ BUILDIN_DEF(getwaitingroomusers, "?"), BUILDIN_DEF(enablewaitingroomevent,"?"), BUILDIN_DEF(disablewaitingroomevent,"?"), BUILDIN_DEF2(enablewaitingroomevent,"enablearena",""), // Added by RoVeRT@@ -15134,7 +15207,7 @@ BUILDIN_DEF(bg_get_data,"ii"), BUILDIN_DEF(bg_getareausers,"isiiii"), BUILDIN_DEF(bg_updatescore,"sii"),-+ BUILDIN_DEF(getbgmembers, "i"), // Instancing BUILDIN_DEF(instance->create,"si"), BUILDIN_DEF(instance->destroy,"?"), -
As I remembered, the rid2name only support player's account id not char id, you should change back to account id script->setd_sub(st, NULL, ".@account_ids", *users, (void *)h64BPTRSIZE(sd->status.account_id), NULL); and OnPCLoadMapEvent: if(strcharinfo(3)!="event_wroom") end; if( getmapusers("event_wroom") >= 10 && !$@gamerunning ) { $@gamerunning = 1; //--->when the event end , remember to set this varaible to 0; mapannounce "event_wroom", "Event is about to start in 3 seconds.",0; sleep2 1000; mapannounce "event_wroom", "3",0; sleep2 1000; mapannounce "event_wroom", "2",0; sleep2 1000; mapannounce "event_wroom", "1",0; sleep2 1000; mapannounce "event_wroom", "Let's get it on!",0; .@len = getareausersid("event_wroom",1,1,500,500); freeloop(1); for( .@i = 0; .@i < .@len; .@i++ ) { if( attachrid(.@account_ids[.@i]) && checkvending() ) { atcommand "@kick "+strcharinfo(0); } } freeloop(0); donpcevent "event_quest::OnStart"; } end;
-
I've modified it.changed this part -> setd_sub(st, NULL, ".@account_ids", *users, (void *)__64BPRTSIZE(sd->status.account_id), NULL); to this one -> setd_sub(st, NULL, ".@char_ids", *users, (void *)__64BPRTSIZE(sd->status.char_id), NULL); and extracting the char id's works successfully. the problem is with the script only. script->setd_sub(st, NULL, ".@char_ids", *users, (void *)h64BPTRSIZE(sd->status.char_id), NULL); Thanks for this.. But it still doesn't kick the vendors :/Would you mind to check the script itself? Coz I have a hunch that it's actually because of the script.. I can't understand the logic of your script , why did you need to kick all vendors on that event map?why not just set mapflag novending to that map?
-
I've modified it. changed this part -> setd_sub(st, NULL, ".@account_ids", *users, (void *)__64BPRTSIZE(sd->status.account_id), NULL); to this one -> setd_sub(st, NULL, ".@char_ids", *users, (void *)__64BPRTSIZE(sd->status.char_id), NULL); and extracting the char id's works successfully. the problem is with the script only. script->setd_sub(st, NULL, ".@char_ids", *users, (void *)h64BPTRSIZE(sd->status.char_id), NULL);
-
its .@account_ids[.@i] not .@char_ids[.@i]
-
Which Forum do you prefer? [MyBB, phpBB, vBulletin, IPB, Xenforo]
Angelmelody replied to Yoh Asakura's topic in Off Topic
I prefer discuz forum, becoz there are a lot of plugins for use -
unfortunate me then i didn't understand how to do it, can you help me with that , TBH Litro - script test456 -1,{OnEquipEvent: if (@eqpos <= 0) end; if(@eqpos&(1024|2048|4096)) { if(@eqpos&1024) { .@cp = EQI_HEAD_TOP; .@lp = LOOK_HEAD_TOP; } else if ( !(@eqpos&1024) && @eqpos&2048) { .@cp = EQI_HEAD_MID; .@lp = LOOK_HEAD_MID; } else if (!(@eqpos&1024) && !(@eqpos&2048) && @eqpos&4096) { .@cp = EQI_HEAD_LOW; .@lp = LOOK_HEAD_BOTTOM; } .@rlook = getiteminfo(getequipid(.@cp),11); changelook .@lp, .@rlook; } else if (@eqpos&(256|512|1)) { if(@eqpos&256) { .@cp = EQI_HEAD_TOP; .@lp = LOOK_HEAD_TOP; } else if ( !(@eqpos&256) && @eqpos&512) { .@cp = EQI_HEAD_MID; .@lp = LOOK_HEAD_MID; } else if (!(@eqpos&256) && !(@eqpos&512) && @eqpos&1) { .@cp = EQI_HEAD_LOW; .@lp = LOOK_HEAD_BOTTOM; } .@rlook = getiteminfo(getequipid(.@cp),11); changelook .@lp, .@rlook; } @eqpos = 0; end;OnUnEquipEvent: if (@uneqpos <= 0) end; if (@uneqpos&(256|512|1)) { if(@uneqpos&256) { .@cp = EQI_HEAD_TOP; .@lp = LOOK_HEAD_TOP; } else if ( !(@uneqpos&256) && @uneqpos&512) { .@cp = EQI_HEAD_MID; .@lp = LOOK_HEAD_MID; } else if (!(@uneqpos&256) && !(@uneqpos&512) && @uneqpos&1) { .@cp = EQI_HEAD_LOW; .@lp = LOOK_HEAD_BOTTOM; } .@rlook = getiteminfo(getequipid(.@cp),11); changelook .@lp,.@rlook; } @uneqpos = 0; end;} test456.patch