-
Posts
2044 -
Joined
-
Last visited
-
Days Won
51
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Everything posted by AnnieRuru
-
no, I recommend just the source modification enough just like this enoughbtw if you are satisfy with this source modification, I'll move this topic into source request
-
I've been making event scripts for 4 years, and this whisper system has been stuck into my scripting style =/ bindatcmd might be normal for you guys, but for me who have been scripting for 6 years, I need some time to adjust so here I rewrite again candy_event_0.4.txt activate this event by @candy if you are GM60 or above and damn ... now I got more scripts to update -.-" @Capuche I believe this script only works on recent SVN because I use *cleanmap script command which only added recently http://trac.rathena.org/changeset/16971/rathena
-
noitem_mapflag_17101.patch prontera mapflag noitem 0 disable all healing items in prontera or you can use https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/db/re/item_noequip.txt to disable using an items, its better to use item_noequip.txt by database or use this source modifications ... using npc scripts seems wasting server resources
-
EXCELLENT! I was trying to get a chance to rewrite my student's script I actually don't like people showing off their paid scripts where the solution isn't shown to publicif you want to do that, please do it in PMs otherwise, I'm rewriting your script getstorageitem patch http://pastebin.com/raw.php?i=XsYif6tL item script update item_db_re set script = concat( script, ' callfunc "restock_pot", 501;' ) where id = 501; npc script function script restock_pot { .@restock_rate = 5; if ( !countitem( getarg(0) ) ) { if ( countstorageitem( getarg(0) ) >= .@restock_rate ) { delstorageitem getarg(0), .@restock_rate; getitem getarg(0), .@restock_rate; } } return; } no need to add another event label like OnPCConsumeEvent: can just do it with callfunc or doevent update item_db_re set script = concat( script, ' callfunc "restrict_item";' ) where id = 501; function script restrict_item { if ( strcharinfo(3) == "guild_vs2" ) warp "SavePoint", 0,0; return; } I'm trying to rewrite this noitem mapflag also ... give me some time
-
- script sdflsdflksjdfldj -1,{ OnInit: while (1) { if ( getmapusers("guild_vs2") ) disablenpc "test_warp"; else enablenpc "test_warp"; sleep 5000; } end; // shouldn't reach } prontera,155,180,5 script test_warp 45,1,1,{ warp "guild_vs2", 0,0; disablenpc strnpcinfo(0); end; }
-
update this script candy_event_0.3.txt you can use Whisper to this npc npc:Grab the Candy ! or use OnClockxxxx: ... just uncomment it
-
all answer here require mob controller system - script dkfjhskdfjh -1,{ OnInit: .id[0] = bg_monster( 0,"prontera",150,175,"--ja--",1002, strnpcinfo(0)+"::On0die" ); .id[1] = bg_monster( 0,"prontera",160,175,"--ja--",1002, strnpcinfo(0)+"::On1die" ); unitattack .id[0], .id[1]; unitattack .id[1], .id[0]; end; On0die: callsub L_kill, 1; On1die: callsub L_kill, 0; L_kill: unittalk .id[ getarg(0) ], "I win !!"; sleep 2000; unitkill .id[ getarg(0) ]; // hahaha end; } if you use unitkill script command, yeah, even a non-aggressive monster will attack others - script dkfjhskdfjh2 -1,{ OnInit: .emp = bg_monster( 0,"prontera",155,175,"--ja--",1288, strnpcinfo(0)+"::OnEmpDown" ); for ( .@i = 0; .@i < 10; .@i++ ) { .id[.@i] = bg_monster( 0,"prontera",150 +.@i,175,"--ja--",1001, "" ); unitattack .id[.@i], .emp; } end; OnEmpDown: announce "Emperium has fallen !", 0; end; } no, an NPC has no HP whatsoever to make it attack by monsters - script hero_def -1,{ if ( .ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_WALKACK ) { getmobdata .ai_action[AI_ACTION_SRC], .@data; if ( .@data[6] < 46 || .@data[6] > 53 || .@data[7] < 46 || .@data[7] > 53 ) { unitwalk .ai_action[AI_ACTION_SRC], .@data[6] + .movement[ getd( ".dir_"+ .ai_action[AI_ACTION_SRC] ) *2 ], .@data[7] + .movement[ getd( ".dir_"+ .ai_action[AI_ACTION_SRC] ) *2 +1 ]; end; } else { unitkill .ai_action[AI_ACTION_SRC]; .life_left--; if ( .life_left ) end; announce "what a loser, you guys failed", 0; } } else if ( !.round ) end; else if ( .ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_DEAD ) { .mob_left--; if ( .mob_left ) end; .round++; if ( .round <= .no_of_wave ) { callsub L_spawn; end; } announce "congratulations !", 0; for ( .@i = 0; .@i < .register_count; .@i++ ) getitem 501, 1, .register_aid[.@i]; // reward item here } .round = 0; killmonsterall .map$; sleep 5000; getmapxy .@map$, .@x, .@y, 1, .npcname$; mapwarp .map$, .@map$, .@x, .@y; donpcevent .npcname$ +"::OnCreateRoom"; end; OnInit: .minplayer2start = 1; // minimum player to start .life = 10; // amount of life .no_of_mobs_per_side = 25; // max 32 .no_of_wave = 3; // number of wave to be defeated .map$ = "guild_vs2"; // name of the map setarray .spawn, // rand(x1,x2) , rand(y1,y2) 46,53 , 88,93 , // North spawn coordinates 88,93 , 46,53 , // West spawn coordinates 46,53 , 6,11 , // South spawn coordinates 6,11 , 46,53 ; // East spawn coordinates setarray .movement, // movement directions 0, -1, // north movement towards south -1, 0, // west movement towards east 0 , 1, // south movement towards north 1 , 0; // east movement towards west setarray .mapflag, mf_nosave, mf_nowarp, mf_nowarpto, mf_noteleport, mf_nomemo, mf_nopenalty, mf_nobranch, mf_noicewall, mf_nomobloot, mf_nomvploot; .@size = getarraysize( .mapflag ); for ( .@i = 0; .@i < .@size; .@i++ ) setmapflag .map$, .mapflag[.@i]; sleep 1; donpcevent .npcname$ +"::OnCreateRoom"; end; OnEventInit: .round = 1; callsub L_spawn; .life_left = .life; while ( .round ) { for ( .@i = 0; .@i < .register_count; .@i++ ) { attachrid .register_aid[.@i]; showdigit .life_left; } sleep 5050; } end; L_spawn: .mob_left = .no_of_mobs_per_side * 4; for ( .@i = 0; .@i < 4; .@i++ ) { for ( .@j = .no_of_mobs_per_side * .@i; .@j < .no_of_mobs_per_side * ( .@i +1 ); .@j++ ) { .id[.@j] = mobspawn( "--ja--", 1002, .map$, rand( .spawn[ 4 * .@i + 0 ] , .spawn[ 4 * .@i + 1 ] ), rand( .spawn[ 4 * .@i + 2 ], .spawn[ 4 * .@i + 3 ] ) ); setd ".dir_"+ .id[.@j], .@i; mobattach .id[.@j], strnpcinfo(0); setmobdata .id[.@j], 25, AI_ACTION_TYPE_WALKACK | AI_ACTION_TYPE_DEAD; setmobdata .id[.@j], 26, 1; getmobdata .id[.@j], .@data; unitwalk .id[.@j], .@data[6] + .movement[ 2 * .@i + 0 ], .@data[7] + .movement[ 2 * .@i + 1 ]; } } return; OnPCDieEvent: OnPCLogoutEvent: if ( !.round || strcharinfo(3) != .map$ ) end; while ( .register_aid[.@i] != getcharid(3) && .@i < .register_count ) .@i++; deletearray .register_aid[.@i], 1; .register_count--; warp "Save", 0,0; if ( .register_count ) end; announce "all players log out <.<", 0; killmonsterall .map$; .round = 0; donpcevent .npcname$ +"::OnEventInit"; end; } prontera,155,187,6 script Hero Defence 100,{ end; OnInit: set getvariableofnpc( .npcname$, "hero_def" ), strnpcinfo(0); end; OnCreateRoom: waitingroom "Hero Defence", getvariableofnpc( .minplayer2start, "hero_def" ) +1, strnpcinfo(0)+"::OnEventInit", getvariableofnpc( .minplayer2start, "hero_def" ); end; OnEventInit: warpwaitingpc getvariableofnpc( .map$, "hero_def" ), 0,0; copyarray getvariableofnpc( .register_aid, "hero_def" ), $@warpwaitingpc, $@warpwaitingpcnum; set getvariableofnpc( .register_count, "hero_def" ), $@warpwaitingpcnum; delwaitingroom; donpcevent "hero_def::OnEventInit"; end; } ... I admit this last one is the one that pose a bit of challenge for my scripting ability EDIT: I even update this script about 3 times already by the way if you want to ask several question, its better to open several topics >.>
-
you can try mine http://rathena.org/board/topic/77197-change-permission-can-trade-false-if-account-id/#entry171740 and for permanent, I think its better to create a new group that is separated so its easier to tell apart which one is time limited, and which is permanent group ID 1 = Super Player group ID 2 = Super Player+
-
OnSun2130: I actually wants to rewrite that devil square script, its not an optimized script, and not easily to edit
-
lol, there's no known way to counter the players for bypassing item giver script I always refuse for private server giving out newbie items, it always create problems I prefer starter kit only comes with donations ( pay to rent the item for x days ) well, at least this is what I've learned after working on quite a few servers I can also create a guild on my own and create more accounts/characters to join the guild until meet the members requirement lol
-
Cluckers error! help.. (Pvp ladder cause it error i think)
AnnieRuru replied to donkeyg's question in Scripting Support
change if (rand(50) < 4) { into if (rand(50) < 50) { to make this having about ~7% chance of getting it win ( 1/14 ) -
query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@lip$); query_sql("SELECT last_ip FROM `guildpack`", .@flip$); // WTF is this line ?? select 1st line only ? if ( .@lip$ == .@flip$ ) { mes "^616D7EIt seems you and your Guild Mates are from IP Address: ^ff0000" + .@flip$ + "^000000. Sorry, but its not allowed."; close; } query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lip$ + "')"); I think this part is wrong it should be if ( query_sql( "select 1 from guildpack where last_ip = "+ getcharip(), .@dummy ) ) { mes "^616D7EIt seems you and your Guild Mates are from IP Address: ^ff0000" + .@flip$ + "^000000. Sorry, but its not allowed."; close; } query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + getcharip() + "')"); @Mootie hard to tell, I can also go play in CC and claim the item, and go back home to claim another item since the mac_address is dynamic to your hardware setting, if you use different computer + different IP, you can bypass this also @nanakiwurtz mes "These present are not tradable and not dropable"; you went off-topic
-
meh only teach advance scripting techniques xD create table test_point ( char_id int(11) unsigned primary key, name varchar(24), points int(11), key (name) ) engine = innodb; prontera,155,182,4 script kjsdfksdjfhs 100,{ query_sql "select points from test_point where char_id = "+ getcharid(0), .@points; mes "you currently have "+ .@points +" points"; close; OnNPCKillEvent: if ( killedrid != 1002 ) end; .@points = rand(10); query_sql "insert into test_point values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', "+ .@points +" ) on duplicate key update points = points + "+ .@points; end; }
-
wow ! you pointed me in right direction ! gives you 1 rep mob_controller_17100.patch and this script is now working fine in latest rathena SVN - script poring_race -1,{ if ( .ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_WALKACK ) { getmobdata .ai_action[AI_ACTION_SRC], .@data; unitwalk .ai_action[AI_ACTION_SRC], .@data[6] -1, .@data[7]; } else if ( .ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_DEAD ) { if ( .ai_action[AI_ACTION_TAR_TYPE] == AI_ACTION_TAR_TYPE_PC ) .@name$ = rid2name(.ai_action[AI_ACTION_TAR]); else if ( .ai_action[AI_ACTION_TAR_TYPE] ) { getmobdata .ai_action[AI_ACTION_TAR], .@slave; if ( .@slave[4] < 100000000 ) .@name$ = rid2name(.@slave[4]); } if ( getstrlen( .@name$ ) ) mapannounce "guild_vs2", .@name$ + " stop killing already", 0; .@id = getd( ".id"+ .ai_action[AI_ACTION_SRC] ); callsub L_spawn, .@id; setd ".id"+ .@id, 0; } end; OnInit: for ( .@i = 1; .@i <= 6; .@i++ ) callsub L_spawn, .@i; end; L_spawn: .gid[ getarg(0) ] = mobspawn( getarg(0) +"", 1002, "guild_vs2", 62, 56 - getarg(0) *2 ); setd ".id"+ .gid[ getarg(0) ], getarg(0); mobattach .gid[ getarg(0) ], strnpcinfo(0); setmobdata .gid[ getarg(0) ], 25, AI_ACTION_TYPE_DEAD | AI_ACTION_TYPE_WALKACK; setmobdata .gid[ getarg(0) ], 26, 1; unitwalk .gid[ getarg(0) ], 61, 56 - getarg(0) *2; return; } guild_vs2 mapflag nomobloot
-
then I suggest further for 1 for unique ID, and 2nd one for original unique ID the original unique ID field is usually left 0 1. @item 501 2 create unique ID 1 to these 2 red potions ID | ... | type | nameid | amount| ... | unique ID 1 | unique ID 2 1 | ... | A | 501 | 2 | ... | 1 | 0 2. @item 501 3 replace existing unique ID, since its stackable ID | ... | type | nameid | amount| ... | unique ID 1 | unique ID 2 2 | ... | A | 501 | 3 | ... | 1 | 0 3. when drop on floor, trade, mail ... etc etc, that requires to unstack the items create another unique ID (2) to those that has already stacked out and unique ID 1 remains to that from the one getting unstack -> drop 1 red potion on floor ID | ... | type | nameid | amount| ... | unique ID 1 | unique ID 2 3 | ... | P | 501 | -1 | ... | 2 | 1 so when you want to trace item, you'll be able to trace that red pot with `unique ID 1` until 2 and you'll see `unique ID 2` field is not zero, then continue trace with `unique ID 1` field http://www.eathena.ws/board/index.php?showtopic=185024 actually this has already been suggested before but with that suggestion, it only meant to log non-stack-able items
-
seems like you are able to edit other member's script and add extra features on it but you should know this ghost's pvp script is actually an unoptimized script mine one ... http://www.eathena.ws/board/index.php?showtopic=177918 is outdated and bug on rathena, but still much optimized than his and works the closest one to your request
-
actually its possible o.o our guild storage is also a source modifications of official kafra storage, and guild storage only exist in *athena, not on Aegis but if we remove the guild storage, *athena community will complains xD a little bit some intense of source modifications might be able to work this out ... but its more practical to get this done with just npc script
-
as far as I concern, the script under OnPCStatCalcEvent label is very short OnPCStatCalcEvent: if ( strcharinfo(3) == "guild_vs2" && .Juggernaught_aid == getcharid(3) ) // conditions bonus .... ; // put all the bonus end;// that's all ^.^ the only things that really concern you is the condition to add the bonus ? lol ? isn't the equipments { Iitem Script } field also run the item script field 255 times ?http://www.eathena.w...dpost&p=1007915 whats the difference ? and @str 255 will run the script field once, as well as OnPCStatCalcEvent also once OnPCIdleEvent, OnPCUseSkill, OnPCAttackEvent, OnPCChatEvent for these 4 I might reconsider, but this one I don't mind still not convince enough ? originally, if we want a donators in a server to gain a permanent status boost we can either 1. use sc_start with high amount <-- looks noob code 2. create a new equipment with insane stats <-- more practical, and everyone currently doing this but the equipment might broke or strip ( can counter with bUnbreakable*** and bUnstripable*** though ) or this 3. OnPCStatCalcEvent OnPCStatCalcEvent: if ( getgroupid() == 1 ) { // Super Player bonus bAllStats, 10; bonus2 bExpAddRace,10,100; bonus2 bExpAddRace,11,100; } end; super player gains a permanent +10 all stats and +100% exp gain by just being a Super Player with no.2, if use /str+100 also execute donator equipment's Item script 100 times or no.3, /str+100 also execute this label 100 times I don't see any difference
-
use OnPCKillEvent instead of OnPCDieEvent: OnPCKillEvent: if ( getgmlevel() >= $icaGMLevel ) end; .@name$ = strcharinfo(0); attachrid killedrid; if ( #streak <= 2 ) end; announce .@name$ +" has ended "+ strcharinfo(0) +"'s "+ .streakname$[ #streak ] +" at map "+ strcharinfo(3), 0; end; something like this
-
if the mob mode has unset MD_CANMOVE, it can't even move prontera,156,178,5 script kdjhfksdjfs 100,{ getmapxy .@map$, .@x, .@y, 0; .@id = bg_monster( 0, .@map$, .@x, .@y, "--ja--", 1002, "" ); // poring can walk unitwalk .@id, .@x + 5, .@y; .@id = bg_monster( 0, .@map$, .@x, .@y, "--ja--", 1288, "" ); // emperium can't walk unitwalk .@id, .@x + 5, .@y; end; } that defeat the purpose of mob controller systemcurrently I want to write a DOTA battleground script, I have to use this mob controller system to simulate attack-move feature like real-time-strategy games whichever smaller one take placeeven if you set it to 255, with area_size 14, it still only chase you within 14 cells wiki is wrong this code were working before mob controller took out, in 13020, but doesn't work in rathena +int mob_script_callback(struct mob_data *md, struct block_list *target, short action_type) +{ + // DEBUG: Uncomment these if errors occur. --- + // nullpo_retr(md, 0); + // nullpo_retr(md->nd, 0); + // ------------------------------------------- + if ( md->callback_flag & action_type ){ + int regkey = add_str(".ai_action"); + linkdb_replace(&md->nd->u.scr.script->script_vars,(void *)regkey, (void *)(int)action_type); + if(target){ + linkdb_replace(&md->nd->u.scr.script->script_vars,(void *)(regkey+(1<<24)), (void *)(int)target->type); + linkdb_replace(&md->nd->u.scr.script->script_vars,(void *)(regkey+(2<<24)), (void *)target->id); + } + linkdb_replace(&md->nd->u.scr.script->script_vars,(void *)(regkey+(3<<24)), (void *)md->bl.id); + run_script(md->nd->u.scr.script, 0, 0, md->nd->bl.id); + return 1; + } + return 0; +}
-
the problem here is setmobdata .gid,26,0; this one doesn't work because the patch is bug I've tried your patch and these are the error that I got 1>...\src\map\mob.c(3640): warning C4133: 'function' : incompatible types - from 'DBMap **' to 'linkdb_node **' 1>...\src\map\mob.c(3642): warning C4133: 'function' : incompatible types - from 'DBMap **' to 'linkdb_node **' 1>...\src\map\mob.c(3643): warning C4133: 'function' : incompatible types - from 'DBMap **' to 'linkdb_node **' 1>...\src\map\mob.c(3645): warning C4133: 'function' : incompatible types - from 'DBMap **' to 'linkdb_node **' 1>...\src\map\script.c(15198): error C2198: 'mob_once_spawn' : too few arguments for call I also tried to create my own mob_controller_17097.patch also doesn't work I only fixed the mob_once_spawn from *mob_spawn command that linkdb_replace in mob_script_callback function, I dunno how to fix it http://www.eathena.ws/board/index.php?s=&showtopic=274110&view=findpost&p=1503992 must at least try to get the patch working and get that script working fine
-
since I discover this OnPCStatCalcEvent I keep bringing it up in scripting section and I start to get sick I have to update this patch every single time when I comply a request with it http://rathena.org/board/topic/76088-skill-in-map/#entry166271 http://rathena.org/board/topic/77185-function-changelook-random-viewid/#entry171792 and a few unused like http://rathena.org/board/topic/74206-close-drop-certain-item-on-certain-map/#entry155980 http://rathena.org/board/topic/72989-capture-the-flag-woe-script/#entry150735 I believe this mod is very very helpful for example, in this topic - script kdfjshksfjhksdfj -1,{ OnPCStatCalcEvent: bonus2 bExpAddRace,10,100; // PS: ... can someone confirm this exp is getting more than usual ? bonus2 bExpAddRace,11,100; end; }
-
OnPCStatCalcEvent_17097.patch prontera,156,182,5 script kjfhskjf 100,{ input @changelook_mid_head; if ( @changelook_mid_head ) changelook LOOK_HEAD_MID, @changelook_mid_head; else if ( !@changelook_mid_head && getequipid( EQI_HEAD_MID ) != -1 ) changelook LOOK_HEAD_MID, getiteminfo( getequipid( EQI_HEAD_MID ),11 ); close; OnPCStatCalcEvent: if ( @changelook_mid_head ) changelook LOOK_HEAD_MID, @changelook_mid_head; end; } if you can understand this script, your request is no problem something like OnItemUse: @changelook_mid_head = rand(1527,1621); end; OnPCStatCalcEvent: if ( @changelook_mid_head ) changelook LOOK_HEAD_MID, @changelook_mid_head; end;
- 1 reply
-
- 1
-
-
Armor Enchant that selects what you equipped
AnnieRuru replied to Yudax's question in Script Requests
this is my last support on this topic you should have test the script in a test server before you ask a question because all the question I keep answering is yes/no, means you didn't even try to edit it yourself and 2nd, you keep changing your request, it has already gone very far from your 1st post yes change delitem .item_id, .item_req[ .@enchance ]; into delitem .item_id, 3; while keep the rest intact -
try search the keyword itemizer plenty on this forum and you forgot checkweight as well