-
Posts
2407 -
Joined
-
Last visited
-
Days Won
52
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Everything posted by Capuche
-
2/ You tested it with your admin... your setting for id:99 ?
-
In battle.c remove //SG_FUSION hp penalty [Komurka] if (sc->data[sC_FUSION]) { int hp= sstatus->max_hp; if (sd && tsd) { hp = 8*hp/100; if (((int64)sstatus->hp * 100) <= ((int64)sstatus->max_hp * 20)) hp = sstatus->hp; } else hp = 2*hp/100; //2% hp loss per hit status_zap(src, hp, 0); } then recompile
-
mob_item_ratio.txt That means drop rate can't be lower than your item_drop_*_min, you must change your item_drop_*_min setting
-
This script need source modifications. Topic
-
I don't see any problem. These equipment are costumes, click on tab costume in your equipment window
-
No it's a bit more complicated Find npc\guild2\guild_flags.txt. For each NPC add if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, strnpcinfo(1) +"#flag_sc01_1" ); warp .@map$, .@x, .@y; end; with #flag_sc01_1 relate to schg_cas01, #flag_sc02_1 relate to schg_cas02, etc.. flag_Ar01_1 relate to arug_cas01 etc.. for example, #flag_sc01_1 for castle 1 ( 'coz FlagEmblem GetCastleData("schg_cas01",1); inside this NPC) yuno,109,167,5 script Himinn 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, strnpcinfo(1) +"#flag_sc01_1" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlesc01: FlagEmblem GetCastleData("schg_cas01",1); end; }
-
pvp_n_4-5 mapflag restricted 7 prontera,127,212,0 script Emperium Breaker Test 1288,{ set .@gm, getgmlevel(); explode( .@b$, $empbrk_record$, "|" ); // Display records // --------------- mes "^FF0000~~ Emperium Breaker Test ~~^000000"; mes "Breaker Top 5 :"; if( !getarraysize( .@b$ ) ) mes "^777777*empty*^000000"; for( set .@i, 0; .@i < getarraysize( .@b$ ); set .@i, .@i + 1 ) mes "^777777"+ ( .@i + 1 ) +"- ^5050A0"+ .@b$[ .@i ] +"^000000"+ callsub( L_time_, $empbrk_record[ .@i ] ); if( empbrk_record ) { mes "______________________________"; set .@rec$, callsub( L_time_, empbrk_record ); mes "Your Own Record:"+ .@rec$; } next; mes "^FF0000~~ Emperium Breaker Test ~~^000000"; mes "Would you like to try a new record?"; if( empbrk_record ) { mes "______________________________"; mes "Your Own Record:"+ .@rec$; } next; menu "^777777~ Yes^000000", -, ( empbrk_record ? "^777777~ Reset my record^000000" : "" ), L_resc, ( .@gm > 98 && $empbrk_record$ != "" ? "^777777~ [ GM ] Reset all^000000" : "" ), L_reset, ( .@gm > 98 ? "^777777~ [ GM ] Reset Rooms^000000" : "" ), L_emptyrooms, "^777777~ Exit^000000", L_exit; deletearray .arena$; // Area arena for getareausers // --------------------------- setarray .@A1, 94,128,105,139; setarray .@A2, 60,94,71,105; setarray .@A3, 94,60,105,71; setarray .@A4, 128,94,139,105; mes "^FF0000~~ Emperium Breaker Test ~~^000000"; for( set .@i, 1; .@i <= 4; set .@i, .@i + 1 ) { if ( getareausers("pvp_n_4-5", getd( ".@A"+ .@i +"[ 0 ]" ), getd( ".@A"+ .@i +"[ 1 ]" ), getd( ".@A"+ .@i +"[ 2 ]" ), getd( ".@A"+ .@i +"[ 3 ]" ) ) ) mes "Emp n° ^0000DF"+ .@i +" ^FF0000 <Busy>^000000"; else { mes "Emp n° ^0000DF"+ .@i +" ^00A000 <Free>^000000"; set .arena$[ .@i -1 ],"^0000DFRoom n°"+ .@i +"^000000"; } } next; getmapxy( @mpempbrk$, @empbrkx, @empbrky, 0 ); // menu arena // ---------- set .@a, select( .arena$[0], .arena$[1], .arena$[2], .arena$[3], "Quit" ); if( .@a == 5 ) close; // x, y for user warp / arena ; x1, y1, x2, y2... // ---------------------------------------------- setarray .@xy[ 2 ], 99, 128, 68, 99, 100, 68, 130, 99; // select arena is empty ? // ----------------------- if ( !getareausers("pvp_n_4-5", getd( ".@A"+ .@a +"[ 0 ]" ), getd( ".@A"+ .@a +"[ 1 ]" ), getd( ".@A"+ .@a +"[ 2 ]" ), getd( ".@A"+ .@a +"[ 3 ]" ) ) ) { warp "pvp_n_4-5", .@xy[ .@a * 2 ], .@xy[ .@a * 2 + 1 ]; killmonster "pvp_n_4-5","EmpBrk#"+ .@a +"::OnThisMobDeath"; donpcevent "EmpBrk#"+ .@a +"::OnEmpBreak"; sc_end SC_ALL; } else mes "Room is now BUSY"; close; // reset top 5 // ----------- L_reset: mes "^FF0000~~ Emperium Breaker Test ~~^000000"; mes "Are you sure to reset official record ?"; if( select( "Yes", "No" ) -1 ) close; mes "All records had been reset."; set $empbrk_record, 0; set $empbrk_record$, ""; close; // reset your record ( + reset record if in top 5 ) // ------------------------------------------------ L_resc: mes "^FF0000~~ Emperium Breaker Test ~~^000000"; mes "Are you sure to reset your record?"; if( select( "Yes", "No" ) -1 ) close; if( $empbrk_record$ != "" ) { explode( .@b$, $empbrk_record$, "|" ); for( set .@i, 0; .@i < getarraysize( .@b$ ); set .@i, .@i + 1 ) if( .@b$[ .@i ] == strcharinfo(0) ) { deletearray .@b$[ .@i ], 1; deletearray $empbrk_record[ .@record ], 1; } set $empbrk_record$, implode( .@b$, "|" ); } mes "Your record has been reset."; set empbrk_record, 0; close; // warp all people out of arena // ---------------------------- L_emptyrooms: mapwarp "pvp_n_4-5","prontera",0,0; L_exit: close; // return time of record ( min sec ms ) // ------------------------------------ L_time_: set .@time, getarg(0); set .@m, .@time / 60000; set .@time, .@time - ( .@m * 60000 ); set .@s, .@time /1000; set .@time, .@time - ( .@s * 1000 ); set .@text$, " ^000080"+ .@m +"^000000m ^000080"+ .@s +"^000000s ^000080"+ .@time +"^000000ms"; return .@text$; } pvp_n_4-5,99,125,0 script EmpBrk#1 -1,2,1,{ OnTouch: killmonster "pvp_n_4-5", strnpcinfo(0) +"::OnThisMobDeath"; mes "^FF0000~~ Emperium Breaker Test ~~^000000"; mes " "; mes "You cannot exit from small square."; close2; stopnpctimer; set getd( "$@someonegotin"+ strnpcinfo(2) ), 0; warp .map_npc$, .x_npc, .y_npc; end; // Spawn emp // --------- OnEmpBreak: copyarray .@xy[ 0 ], getd( ".xy" + strnpcinfo(2) +"[ 0 ]" ), 6; sleep 3000; if ( !getareausers("pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ] ) ) end; areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"Let's ready to break the Emperium",0; sleep 5000; if ( !getareausers("pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ] ) ) end; for( set .@i, 5; .@i > 0; set .@i, .@i - 1 ) { areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ], (.@i +""),0; sleep 1000; } if ( !getareausers("pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ] ) ) end; areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"GO!!!",0; monster "pvp_n_4-5", .@xy[ 4 ], .@xy[ 5 ],"Emperium",1288,1,"EmpBrk#"+ strnpcinfo(2) +"::OnThisMobDeath"; initnpctimer; end; OnThisMobDeath: copyarray .@xy[ 0 ], getd( ".xy" + strnpcinfo(2) +"[ 0 ]" ), 6; stopnpctimer; set .@time, getnpctimer( 0,"EmpBrk#"+ strnpcinfo(2) ); if ( .@time < empbrk_record || !empbrk_record ) { areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"New Own Record!!!",0; set empbrk_record, .@time; } // set top 5 record ; GM level > 50 excluded // ----------------------------------------- if( getgmlevel() < 50 ) { if ( .@time < $empbrk_record[ 0 ] && !$empbrk_record[ 0 ] ) { areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"New Official Record!!!",0; announce strcharinfo(0)+" is now the NO. 1 Emperium Breaker!!",0; } explode( .@b$, $empbrk_record$, "|" ); if( $empbrk_record$ == "" ) set .@no_mark, 1; else { for( set .@i, 0; .@i < 5; set .@i, .@i + 1 ) { if( .@b$[ .@i ] == strcharinfo(0) ) { if( .@time < $empbrk_record[ .@i ] ) { deletearray .@b$[ .@i ], 1; deletearray $empbrk_record[ .@i ], 1; set .@no_mark, 1; } else set .@no_mark, 0; break; } else if( .@time < $empbrk_record[ .@i ] || !$empbrk_record[ .@i ] ) set .@no_mark, 1; } } } if( .@no_mark ) { for( set .@i, 0; .@i < 5; set .@i, .@i + 1 ) if ( .@time < $empbrk_record[ .@i ] || !$empbrk_record[ .@i ] ) { if( .@i != 4 ) { copyarray .@b$[ .@i+1 ], .@b$[ .@i ], 4 - .@i; copyarray $empbrk_record[ .@i+1 ], $empbrk_record[ .@i ], 4 - .@i; set .@b$[ .@i ], strcharinfo(0); set $empbrk_record[ .@i ], .@time; } else { set .@b$[ getarraysize( .@b$ ) -1 ], strcharinfo(0); set $empbrk_record[ getarraysize( .@b$ ) -1 ], .@time; } set $empbrk_record$, implode( .@b$, "|" ); break; } } set .@m, .@time / 60000; set .@time, .@time - (.@m * 60000); set .@s, .@time /1000; set .@time, .@time - (.@s * 1000); areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"Your time is "+ .@m +"m "+ .@s +"s "+ .@time +"ms",0; sleep 2000; // Debug : warp 20 min later if afk // -------------------------------- OnTimer1200000: areawarp "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ], .map_npc$, .x_npc, .y_npc; stopnpctimer; end; OnInit: getmapxy( .map_npc$, .x_npc, .y_npc, 1, "Emperium Breaker Test" ); // set area for announce + x, y to spawn emp // ----------------------------------------- switch( strnpcinfo(2) ) { case 1: setarray .xy1, 94, 128, 105, 139, 100, 134; break; case 2: setarray .xy2, 60, 94, 71, 105, 65, 99; break; case 3: setarray .xy3, 94, 60, 105, 71, 99, 65; break; case 4: setarray .xy4, 128, 94, 139, 105, 134, 99; } end; } pvp_n_4-5,74,99,0 duplicate(EmpBrk#1) EmpBrk#2 -1,1,2 pvp_n_4-5,100,74,0 duplicate(EmpBrk#1) EmpBrk#3 -1,1,2 pvp_n_4-5,125,100,0 duplicate(EmpBrk#1) EmpBrk#4 -1,1,2
-
casp_dun01,279,262,1 script #azergthyjuhgfd1 45,2,2,{ if ( quest_done & 1 << 0 ) warp "casp_dun02",133,114; else { mes "[ Caspen Gatekeeper ]"; mes "....."; close2; warp "casp_dun01",275,265; } end; } casp_dun01,273,269,1 script Unknown Stone 111,{ if ( quest_done & 1 << 0 ) mes "............."; else if ( quest & 1 << 3 ) { mes "Congratulations! "+strcharinfo(0)+","; mes "i wish you are the one who can defeat"; mes "^FF0000Draconus^000000"; next; mes "You can now enter Level 2 Dungeon"; announce ""+strcharinfo(0)+" can now access Caspen Dungeons Level 2! Congratulations!",bc_all; quest_done = 1 ; quest = 0; // save memory; } else if ( quest == 0 ) { mes "[ Unknown Stone ]"; mes "God's given us powers to use it on good ways."; next; mes "[ Unknown Stone ]"; mes "But some monsters abuse it and use it in evil,"; mes "help us to defeat ^FF0000Draconus^000000,"; mes "and our world will be at in peace."; next; mes "[ Unknown Stone ]"; mes "Are you willing to help us on our problem?"; switch(select("No. I'm Scared:Yes! for Prosperity!")) { case 1: next; mes "[ Unknown Stone ]"; mes "Oh my.. I thought you are the chosen one."; mes "my big mistake..!"; close; case 2: next; mes "[ Unknown Stone ]"; mes "^FA5000Old Man, Theus^000000 knows all about the history"; mes "of this dungeon."; next; mes "[ Unknown Stone ]"; mes "Theus will ask you to find him some items and kill some monsters"; next; mes "[ Unknown Stone ]"; mes "Talk to ^FA5000Old Man, Theus^000000,"; mes "you can locate him in Caspen Fields."; next; mes "[ Unknown Stone ]"; mes "Good luck and Take care.!"; quest = 1; } } else { mes "[ Unknown Stone ]"; mes "You must ask ^FA5000Old Man, Theus^000000 on other informations."; } close; } casp_fild01,186,55,4 script Old Man Theus 120,{ if ( quest & 1 << 0 ) { mes "[ Theus ]"; mes "So you must be "+strcharinfo(0)+","; mes "the one who sent by our Gate keeper."; next; mes "[ Theus ]"; mes "So, are you ready to explore Caspen Dungeons?"; switch(select("No~ Thank you.:Yes, I'm excited.")){ case 1: next; mes "[ Theus ]"; mes "Don't Talk to me."; emotion e_shy; close; case 2: next; mes "[ Theus ]"; mes "Before you can Enter the Dungeon"; mes "you must finished my requirements to you"; next; mes "[ Theus ]"; mes "bring me these items."; mes "^00FF00100 Jellopies^000000"; quest = 1 << 1; close; } } else if ( quest & 1 << 1 ) { mes "[ Theus ]"; mes "Oh.. you've returned!"; mes "isn't it difficult?"; switch(select("Piece of Cake.:LOL....")) { case 1: if(countitem(909) < 100){ next; mes "[ Theus ]"; mes "Insuficient item requirements"; mes "Come back again if you collect what i've said"; } else { next; mes "[ Theus ]"; mes "Ohh! Well done."; mes "here's my next request on you"; next; mes "[ Theus ]"; mes "You must Kill these Monsters."; mes "10 Poring"; mes "10 Fabre"; quest = 1 << 2; } close; case 2: next; mes "[ Theus ]"; mes "...........??"; close; } } else if ( quest & 1 << 2 ) { if ( kill_monster_count < ( 10 << 0 ) + ( 10 << 4 ) ) { mes "kill not enough poring & fabre"; close; } mes "well done, go talk to npc1"; quest = 1 << 3; kill_poring_count = 0; close; } mes "lalalala~~"; close; OnNPCKillEvent: if ( ( quest & 1 << 2 ) && ( killedrid == 1002 || killedrid == 1007 ) ) { .@count = ( killedrid == 1002 ? 0 : 1 ); if ( ( kill_monster_count >> 4 * .@count ) % ( 1 << 4 ) < 10 ) { kill_monster_count = kill_monster_count + ( 1 << 4 * .@count ); dispbottom ( killedrid == 1002 ? "poring" : "fabre" ) +" killed ["+ ( ( kill_monster_count >> 4 * .@count ) % ( 1 << 4 ) ) +"/10]"; } } end; } // Warp Portals casp_dun02,132,109,0 warp casp_dun1-1 1,1,casp_dun01,275,265 Edit: @AnnieRuru I just tried to point if ( quest_done & 1 << 0 ) was harder to read than if ( quest_done ) ~
-
Need help with this pretty simple but it's been a while for me xD
Capuche replied to Shio Devs's question in Scripting Support
Add a NPC which hide/unhide Clucker when you want settle Clucker (default : hide ; unhide on event) prontera,150,155,5 script Clucker ON/OFF 456,{ if( getgmlevel() < 1 ) end; if( select( "Hide Clucker", "Unhide Clucker" ) -1 ) hideoffnpc "Cluckers#cluk"; else hideonnpc "Cluckers#cluk"; close; OnInit: hideonnpc "Cluckers#cluk"; end; } turbo_room,89,123,4 script Cluckers#cluk 800,{ // prontera,156,219,4 script Cluckers#cluk 800,{ set .@GMAccess,80; // GM level required to access NPC if (.startcluck) { specialeffect2 2; switch(rand(15)) { case 0: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break; case 1: npctalk "Cluuuuuck!~"; break; case 2: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break; case 3: sc_start SC_Freeze,10000,0; break; case 4: npctalk "CLUUUUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break; case 5: sc_start SC_Sleep,10000,0; break; case 6: sc_start SC_Stone,10000,0; emotion 29; break; case 7: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break; case 8: npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break; case 9: sc_start SC_Stun,10000,0; break; case 10: sc_start SC_Sleep,10000,0; emotion 29; break; case 11: npctalk "Cluck! Cluck!"; break; case 12: sc_start SC_Stun,10000,0; break; case 13: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break; default: if (rand(50) < 4) { npctalk "WOOF!..........."; specialeffect2 72; announce "[Cluck! Cluck! Boom!] " + strcharinfo(0) + " squeezed out the prize! Well done!",0; getitem $cluck_item_id,$cluck_item_amount; set .startcluck,0; } else { npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; } break; } end; } mes "[Cluckers]"; if (getgmlevel() >= .@GMAccess) { mes "Cluck cluck! Cluuuuuck? ^FF0000~Hi GM " + strcharinfo(0) + ", Wanna play today?~^000000"; mes "Cluck cluck... CLUCK! ^FF0000~Just tell me what to do!~^000000"; next; while(1) switch(select("Start Event:Check Prize:Set Prize:Not today Cluckers")) { case 1: mes "[Cluckers]"; mes "CLUCK! ^FF0000~Sure thing!~^000000"; emotion 33; close2; announce "[Cluck! Cluck! Boom!] is about to start in Prontera!",bc_blue; initnpctimer; end; case 2: mes "[Cluckers]"; mes "Cluck, cluck cluck... Cluck! ^FF0000~The current prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +".^000000"; next; break; case 3: mes "[Cluckers]"; mes "Cluck cluck? Cluck??? ^FF0000~What should the prize for winning be? Please input the ID.~^000000"; input $cluck_item_id; next; mes "[Cluckers]"; mes "Cluck? cluuuck? ^FF0000~How many if this item should I give away?~^000000"; input $cluck_item_amount; next; mes "[Cluckers]"; mes "Cluck cluck..? Cluck. ^FF0000~So, the prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +"^000000? ^FF0000Great.~^000000"; emotion 33; next; break; case 4: mes "[Cluckers]"; mes "Cluck cluck cluck..."; close; } } mes "Cluck cluck! Cluuuuuck?"; mes "Cluck...."; close; OnTimer10000: announce "Please hurry behind the fountain if you want to play with the crazy chicken!",bc_blue; end; OnTimer20000: announce "Cluckers has eaten one of my items! I'm too scared to retrieve it!",bc_blue; end; OnTimer30000: announce "Click the insane chicken and try squeeze out the item, if you're lucky you'll win! Are you ready?",bc_blue; end; OnTimer40000: announce "GO! Click the chicken to get the prize!",bc_blue; if (!$cluck_item_id) set $cluck_item_id,512; if (!$cluck_item_amount) set $cluck_item_amount,1; set .startcluck,1; end; OnMinute10: hideoffnpc "Cluckers#cluk"; if ( gettime(3)%2 || .startcluck ) end; announce "[Cluck! Cluck! Boom!] is about to start in Schenberg!!",bc_blue; .startcluck = 1; initnpctimer; end; } -
Just if ( quest_done & 1 << 0 ) lol why not !? Also you should reset kill_poring_count when quest is finished quest = 0; // save memory; kill_poring_count = 0;
-
You're welcome lol It's a gift Yeah I did some mistake here a little revision. mob_db2.txt 2302,GOBLIN_LEADER,Goblin Leader,Goblin Leader,64,5000,0,6036,2184,1,663,752,99,99,5,55,37,30,69,58,10,12,1,7,24,0x3695,120,1120,620,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 prontera,155,180,5 script Goblin Invasion 456,{ if( !.count && .shop ) { mes "Exchange Goblins points ?"; if( select( "Yes", "No" ) -1 ) if( getgmlevel() < 1 ) close; else goto L_event; // Use Euphy's quest_shop // ---------------------- callfunc "qshop", 1; } else if( getgmlevel() < 1 ) close; // GM can Start / Stop Event // ------------------------- L_event: mes ( .count ? "Stop" : "Start" ) +" Goblin Invasion ?"; if( select( "Yes", "No" ) -1 ) close; if( .count ) goto L_stop; OnHour00: OnHour02: initnpctimer; set .Leader, ( rand( 1,100 ) <= .mob_option5[ 1 ] ? 1 : 0 ); set .num, getusers(1) * 3; set .count, .num + 3 + .Leader; set .map$, .map_event$[ rand( getarraysize( .map_event$ ) ) ]; announce .count +" Goblins invade "+ setchar( .map$, strtoupper( charat( .map$, 0 ) ), 0 ) +" citie !", 0; for( set .@i, 1; .@i <= 3; set .@i, .@i + 1 ) { set .@a, ( .@i == 3 ? .num - .@b : ( getd( ".mob_option"+ .@i +"[ 1 ]" ) * .num ) / 100 ); monster .map$,0,0,"--ja--", getd( ".mob_option"+ .@i +"[ 0 ]" ), .@a, strnpcinfo(0) +"::OnKillGob"+ .@i; set .@b, .@b + .@a; } monster .map$,0,0,"--ja--", .mob_option4, 3, strnpcinfo(0) +"::OnKillGob4"; if( .Leader ) monster .map$,0,0,"--ja--", .mob_option5, 1, strnpcinfo(0) +"::OnKillGob5"; close; OnKillGob1: callsub S_getitem, 1;// 1 : just a post-it OnKillGob2: callsub S_getitem, 2; OnKillGob3: callsub S_getitem, 3; OnKillGob4: callsub S_getitem, 4; OnKillGob5: callsub S_getitem, 5; S_getitem: set .count, .count - 1; // Rewards : 1/ Points // ------------------- set .@p, getd( ".mob_option"+ getarg(0) +"[ 2 ]" ); set #Goblin_points, #Goblin_points + .@p; dispbottom "You get "+ .@p +" point"+ ( .@p > 1 ? "s" : "" ) +"."; // 2/ Items // -------- for( set .@i, 3; .@i < getarraysize( getd( ".mob_option"+ getarg(0) ) ); set .@i, .@i + 2 ) getitem getd( ".mob_option"+ getarg(0) +"[ "+ .@i +" ]" ), getd( ".mob_option"+ getarg(0) +"[ "+ ( .@i+1 ) +" ]" ); // Broadcast // --------- switch( .count ) { case 10: announce .count +" Goblins left.", 0; break; case 0: announce strcharinfo(0) +" kill the last Goblin !", 0; getitem 27007, 1; break; // Count down how many goblins are left : if = 100 then broadcast, broadcast by ones if Goblins <= 50 default: if( .count < 100 && .count > 50 || .count > 100 ) end; mapannounce .map$, .count +" Goblins left.", 0; } end; OnTimer1800000:// Automatically stop invasion 30 min later L_stop: stopnpctimer; set .count, 0; killmonsterall .map$; announce ( playerattached() ? strcharinfo(0) +" : " : "" ) +"Event Goblins invasions is finished !", 0; close; OnInit: // Leave this alone for( set .@i, 1; .@i <= 5; set .@i, .@i + 1 ) deletearray getd( ".mob_option"+ .@i ); deletearray .map_event$; // Index : MobID, Spawn rate (70/100), Points reward, ID reward 1, Number reward 1, ID reward 2, Number reward 2, etc... setarray .mob_option1, 2300, 70, 1, 27004, 1; setarray .mob_option2, 2300, 10, 7; // = Mob ID 1122(2) setarray .mob_option3, 2301, 20, 3, 27005, 1; // = Mob ID 1125 // Fix 3 spawn every time / change '3' in < monster .map$,0,0,"--ja--", .mob_option4, 3, strnpcinfo(0) +"::OnKillGob4"; > to change this number setarray .mob_option4, 2303, 100, 1, 27003, 1, 27007, 1; // Goblin Leader / Index : MobID, chance spawn (5/100) PER EVENT, Points reward, ID reward 1, Number reward 1, ID reward 2, Number reward 2, etc... setarray .mob_option5, 2302, 5, 1, 675, 20, 671, 5, 27003, 1, 27007, 1; // Map Invasion // ------------ setarray .map_event$, "amatsu", "prontera", "alberta", "payon"; // Enable Shop ? 1 / 0 : ( yes / no ) // ---------------------------------- set .shop, 0; end; }
-
It's 'normal', defpattern works like that in the script... However, if you want poring instead of poringhjk, for example add if( $@p2$ != "" ) end; after iCorrect: A NPC test for example. prontera,159,185,5 script hjkgfdl 456,{ defpattern 1, "([^:]+):.\\s*"+.MonsterName$+"(.*)", "Lquote26"; activatepset 1; end; Lquote26: for( .@i = 0; .@i < 10; .@i++ ) dispbottom "$@p"+ .@i +"$ : "+ getd( "$@p"+ .@i +"$" ); if( $@p2$ != "" ) end; dispbottom "work ?"; end; OnInit: .MonsterName$ = "high wizard blabla"; end; }
-
Your warning is because you already have a NPC name Putty. Otherwise I test it and it works for me.
-
db/mob_avail.txt 2300,1122,0 2301,1125,0 2302,1299,0 2303,1308,0 db/mob_db2.txt 2300,GOBLIN_1,Goblin,Goblin,25,50,0,310,188,1,118,140,10,5,1,53,25,20,38,10,10,12,1,7,24,0x3695,100,1120,620,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2301,GOBLIN_4,Goblin,Goblin,23,50,0,264,164,1,109,131,10,5,1,23,46,15,36,10,10,12,1,7,22,0x308D,200,1624,624,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2302,GOBLIN_LEADER,Goblin Leader,Goblin Leader,64,5000,0,6036,2184,1,663,752,48,16,5,55,37,30,69,58,10,12,1,7,24,0x3735,120,1120,620,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2303,PANZER_GOBLIN,Panzer Goblin,Panzer Goblin,59,50,0,7212,2697,1,683,878,41,28,60,60,40,20,81,160,10,12,1,7,44,0x3695,200,960,1008,840,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 db/mob_skill_db2.txt 2300,Goblin@NPC_EMOTION,chase,197,1,2000,0,5000,yes,self,always,0,18,,,,,, 2300,Goblin@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,, 2300,Goblin@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,2,0x3695,,,,, 2300,Goblin@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,, 2301,Goblin@NPC_EMOTION,chase,197,1,2000,0,5000,yes,self,always,0,20,,,,,, 2301,Goblin@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,, 2301,Goblin@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,, 2301,Goblin@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,2,0x308D,,,,, 2302,Goblin Leader@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,, 2302,Goblin Leader@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,27, 2302,Goblin Leader@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,27, 2302,Goblin Leader@CR_SHIELDCHARGE,attack,250,3,500,0,5000,no,target,always,0,,,,,,27, 2302,Goblin Leader@NPC_SUMMONSLAVE,attack,196,5,10000,2000,60000,no,self,slavele,2,2300,1123,1124,2301,1126,27, 2302,Goblin Leader@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,2,2300,1123,1124,2301,1126,27, 2303,Panzer Goblin@NPC_SELFDESTRUCTION,attack,173,1,500,2000,5000,no,self,myhpltmaxrate,50,,,,,,23, 2303,Panzer Goblin@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,, 2303,Panzer Goblin@SM_MAGNUM,attack,7,9,500,500,5000,no,self,always,0,,,,,,6, NPC prontera,155,180,5 script Goblin Invasion 456,{ if( getgmlevel() < 1 && !.count ) { mes "Exchange Goblins points ?"; if( select( "Yes", "No" ) -1 ) close; // Use Euphy's quest_shop // ---------------------- callfunc "qshop", 1; } else if( getgmlevel() < 1 ) close; // GM can Start / Stop Event // ------------------------- mes ( .count ? "Stop" : "Start" ) +" Goblin Invasion ?"; if( select( "Yes", "No" ) -1 ) close; if( .count ) goto L_stop; OnHour00: OnHour02: L_invade: initnpctimer; set .Leader, ( rand( 1,100 ) <= .mob_option5[ 1 ] ? 1 : 0 ); set .num, getusers(1) * 3; set .count, .num + 3 + .Leader; set .map$, .map_event$[ rand( getarraysize( .map_event$ ) ) ]; announce .count +" Goblins invade "+ setchar( .map$, strtoupper( charat( .map$, 0 ) ), 0 ) +" citie !", 0; for( set .@i, 1; .@i <= 3; set .@i, .@i + 1 ) { set .@a, ( .@i == 3 ? .num - .@b : ( getd( ".mob_option"+ .@i +"[ 1 ]" ) * .num ) / 100 ); monster .map$,0,0,"--ja--", getd( ".mob_option"+ .@i +"[ 0 ]" ), .@a, strnpcinfo(3) +"::OnKillGob"+ .@i; set .@b, .@b + .@a; } monster .map$,0,0,"--ja--", .mob_option4, 3, strnpcinfo(3) +"::OnKillGob4"; if( .Leader ) monster .map$,0,0,"--ja--", .mob_option5, 1, strnpcinfo(3) +"::OnKillGob5"; close; OnKillGob1: callsub S_getitem, 1;// 1 : just a post-it OnKillGob2: callsub S_getitem, 2; OnKillGob3: callsub S_getitem, 3; OnKillGob4: callsub S_getitem, 4; OnKillGob5: callsub S_getitem, 5; S_getitem: set .count, .count - 1; // Rewards : 1/ Points // ------------------- set .@p, getd( ".mob_option"+ getarg(0) +"[ 2 ]" ); set #Goblin_points, #Goblin_points + .@p; dispbottom "You get "+ .@p +" point"+ ( .@p > 1 ? "s" : "" ) +"."; // 2/ Items // -------- for( set .@i, 3; .@i < getarraysize( getd( ".mob_option"+ getarg(0) ) ); set .@i, .@i + 2 ) getitem getd( ".mob_option"+ getarg(0) +"[ "+ .@i +" ]" ), getd( ".mob_option"+ getarg(0) +"[ "+ ( .@i+1 ) +" ]" ); // Broadcast // --------- switch( .count ) { case 10: announce .count +" Goblins left.", 0; break; case 0: announce strcharinfo(0) +" kill the last Goblin !", 0; getitem 27007, 1; break; // Count down how many goblins are left : if = 100 then broadcast, broadcast by ones if Goblins <= 50 default: if( .count < 100 && .count > 50 || .count > 100 ) end; mapannounce .map$, .count +" Goblins left.", 0; } end; OnTimer1800000:// Automatically stop invasion 30 min later L_stop: set .count, 0; killmonsterall .map$; announce strcharinfo(0) +" stop Event Goblins invasions !", 0; close; OnInit: // Leave this alone for( set .@i, 1; .@i <= 5; set .@i, .@i + 1 ) deletearray getd( ".mob_option"+ .@i ); deletearray .map_event$; // Index : MobID, Spawn rate (70/100), Points reward, ID reward 1, Number reward 1, ID reward 2, Number reward 2, etc... setarray .mob_option1, 2300, 70, 1, 27004, 1; setarray .mob_option2, 2300, 10, 7; // = Mob ID 1122(2) setarray .mob_option3, 2301, 20, 3, 27005, 1; // = Mob ID 1125 // Fix 3 spawn every time / change '3' in < monster .map$,0,0,"--ja--", .mob_option4, 3, strnpcinfo(3) +"::OnKillGob4"; > to change this number setarray .mob_option4, 2302, 100, 1, 27003, 1, 27007, 1; // Goblin Leader / Index : MobID, chance spawn (5/100) PER EVENT, Points reward, ID reward 1, Number reward 1, ID reward 2, Number reward 2, etc... setarray .mob_option5, 2303, 5, 100, 675, 20, 671, 5, 27003, 1, 27007, 1; // Map Invasion // ------------ setarray .map_event$, "amatsu", "prontera", "alberta", "payon"; end; } You can add some time to automatically start the event after OnHour00: OnHour02: 02 : at 2h 04 : at 4h etc.. Here mobs options // Index : MobID, Spawn rate (70/100), Points reward, ID reward 1, Number reward 1, ID reward 2, Number reward 2, etc... setarray .mob_option1, 2300, 70, 1, 27004, 1; setarray .mob_option2, 2300, 10, 7; // = Mob ID 1122(2) setarray .mob_option3, 2301, 20, 3, 27005, 1; // = Mob ID 1125 // Fix 3 spawn every time / change '3' in < monster .map$,0,0,"--ja--", .mob_option4, 3, strnpcinfo(3) +"::OnKillGob4"; > to change this number setarray .mob_option4, 2302, 100, 1, 27003, 1, 27007, 1; // Goblin Leader / Index : MobID, chance spawn (5/100) PER EVENT, Points reward, ID reward 1, Number reward 1, ID reward 2, Number reward 2, etc... setarray .mob_option5, 2303, 5, 100, 675, 20, 671, 5, 27003, 1, 27007, 1; Here maps options // Map Invasion // ------------ setarray .map_event$, "amatsu", "prontera", "alberta", "payon"; GM can start / stop the event otherwise the event can start automatically. It spawns 1 Goblin leader (5% chance per event by default) + 3 * players online + 3 fix Option shop : call Euphy's quest shop 1 (so you must include his script). Maybe it's not very easy to understand this script >'>
-
It's easy to reset by sql no need this option I guess. prontera,155,181,5 script Woe Points 100,{ if( getgmlevel() > 1 ) { if( select( "Reset ?", "Continue" ) == 1 ) { query_sql "UPDATE `guild` SET `woe_points` = '0' WHERE `woe_points` > 0"; close; } } .@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); for ( .@i = 0; .@i < .@nb; .@i++ ) { if ( !.@points[.@i] ) break; mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i]; } close; }
-
Yeah it's attached to the guild not to players.
-
SQL alter table guild add column woe_points int(11) default 0 after emblem_data, add index (woe_points); In npc/guild/agit_main.txt under OnAgitBreak: add query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); Ref this post *If you want to display guild points prontera,155,181,5 script Woe Points 100,{ .@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); for ( .@i = 0; .@i < .@nb; .@i++ ) { if ( !.@points[.@i] ) break; mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i]; } close; }
-
prontera,154,174,5 script Bestry#prt2 56,{ callfunc "refinenew2","Bestry",0,0; end; } morocc_in,64,41,5 script Bestry#moc2 56,{ callfunc "refinenew2","Bestry",0,0; end; } payon_in01,18,132,3 script Bestry#pay2 56,{ callfunc "refinenew2","Bestry",0,0; end; } //============================================================ // +11 and above Refiner Function //============================================================ //= To allow auto safe refining/multiple refining set the //= second argument to '1' in the function call. //= If you enable this function, be sure to edit the value of //= .@safe to the max safe refine in refine_db.txt as well. //= //= The official script uses a command which seems to generate a //= random result upon refining: success, downgrade, or failure. //= To enable that feature, set the third argument to '1' in the //= function call. Otherwise, the chance in refine_db.txt is used. //============================================================ function script refinenew2 { setarray .@down[0], 256, 16, 32, 2, 4, 64, 8, 128, 512, 1; mes "["+ getarg(0) +"]"; mes "I am the best Blacksmith ever!"; next; mes "["+ getarg(0) +"]"; mes "What do you want to have refined?"; next; setarray .@position$[1],"Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3"; set .@menu$,""; for(set .@i,1; .@i<=10; set .@i,.@i+1) { if(getequipisequiped(.@i)) set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$ + ":"; } set .@part,select(.@menu$); if(!getequipisequiped(.@part)) { mes "[" + getarg(0) + "]"; mes "You're not wearing"; mes "anything there that"; mes "I can refine."; emotion e_an; close; } //Check if the item is refinable... if(!getequipisenableref(.@part)) { mes "[" + getarg(0) + "]"; mes "I don't think I can"; mes "refine this item at all..."; close; } //Check if the item is identified... (Don't know why this is in here... but kept it anyway) if(!getequipisidentify(.@part)) { mes "[" + getarg(0) + "]"; mes "You can't refine this"; mes "if you haven't appraised"; mes "it first. Make sure your"; mes "stuff is identified before"; mes "I can refine it."; close; } if(getequiprefinerycnt(.@part) > 9) { mes "["+ getarg(0) +"]"; mes "I can't refine this"; mes "any more. This is as"; mes "refined as it gets!"; close; } set .@refineitemid, getequipid(.@part); // save id of the item set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) { set .@material,6224; set .@price,100000; set .@safe,10; mes "["+ getarg(0) +"]"; mes "Hmm a weapon, is that ok?"; mes "If you want to refine this weapon,"; mes "I will need 1 ^003366Bradium^000000 and 100,000 zeny."; mes "Are you sure you want to continue?"; } else { set .@material,6223; set .@price,100000; set .@safe,10; mes "["+ getarg(0) +"]"; mes "Hmm an armor, is that ok?"; mes "If you want to refine this armor,"; mes "I will need 1 ^003366Carnium^000000 and 100,000 zeny."; mes "Are you sure you want to continue?"; } next; if(select("Yes:No") == 2){ mes "["+ getarg(0) +"]"; mes "Well, no challenge is one way..."; mes "No risk... that could be wise."; close; } if(getarg(1) != 1) { if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) { mes "["+ getarg(0) +"]"; mes "This weapon already has been refined serveral times."; next; mes "["+ getarg(0) +"]"; mes "You could have the upgrade level of the weapon decreased."; } else { mes "["+ getarg(0) +"]"; mes "You could have the upgrade level of the armor decreased."; } next; mes "["+ getarg(0) +"]"; mes "Do you want me to refine it?"; mes "I think I gave you enough warnings."; next; if(select("Yes.:No.") == 2) { mes "["+ getarg(0) +"]"; mes "Well, no challenge is one way.."; mes "No risk.. that could be wise."; close; } if(countitem(.@material) < 1 || Zeny < .@price) { mes "["+ getarg(0) +"]"; mes "Hm, it seems you don't have enough materials or money."; mes "Please check it out."; close; } set Zeny,Zeny - .@price; delitem .@material,1; if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?) mes "[" + getarg(0) + "]"; mes "Look here... you don't have any items on..."; close; } if(getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item mes "[" + getarg(0) + "]"; emotion e_an; mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } if(getarg(2) == 1){ set .@rand,rand(1,3); if (.@rand == 1) { mes "Clang! Clang! Clang! Clang!"; successrefitem .@part; next; emotion e_no1; mes "["+ getarg(0) +"]"; mes "Good! Succes!!!"; mes "I am the best Blacksmith."; close; } else { mes "["+ getarg(0) +"]"; mes "Clang! Clang! Clang! Clang!"; atcommand "@refine "+ .@down[.@part -1] +" -1"; next; emotion (!rand(5))?e_cash:e_omg; mes "["+ getarg(0) +"]"; mes "Ahhh!!!"; next; mes "["+ getarg(0) +"]"; mes "Oh my!"; mes "The upgrade level has dropped..."; mes "There could've been made an mistake even though I am the best ever."; mes "It was out of my hands."; next; mes "["+ getarg(0) +"]"; mes "I will do a better job next time! Don't worry!"; close; } } set .@rand,rand(100); if (getequippercentrefinery(.@part) > .@rand) { mes "Clang! Clang! Clang! Clang!"; successrefitem .@part; next; emotion e_no1; mes "["+ getarg(0) +"]"; mes "Good! Succes!!!"; mes "I am the best Blacksmith."; close; } else { mes "["+ getarg(0) +"]"; mes "Clang! Clang! Clang! Clang!"; atcommand "@refine "+ .@down[.@part -1] +" -1"; next; emotion (!rand(5))?e_cash:e_omg; mes "["+ getarg(0) +"]"; mes "Ahhh!!!"; next; mes "["+ getarg(0) +"]"; mes "Oh my!"; mes "The upgrade level has dropped..."; mes "There could've been made an mistake even though I am the best ever."; mes "It was out of my hands."; next; mes "["+ getarg(0) +"]"; mes "I will do a better job next time! Don't worry!"; close; } } // New +11 and above Refining Functions ======================== if(getequiprefinerycnt(.@part) < .@safe) { mes "[" + getarg(0) + "]"; mes "I can refine this to the safe limit or a desired number of times. It's your choice."; next; set .@menu2,select("To the safe limit, please.","I'll decide how many times.","I've changed my mind..."); } else set .@menu2,2; switch(.@menu2){ case 1: set .@refinecnt,.@safe - getequiprefinerycnt(.@part); break; case 2: next; mes "[" + getarg(0) + "]"; mes "How many times would you like me to refine your item?"; next; input .@refinecnt; set .@refinecheck,.@refinecnt + getequiprefinerycnt(.@part); if (.@refinecnt < 1 || .@refinecheck > 10) { mes "[" + getarg(0) + "]"; mes "I can't refine this item that many times."; close; } if(.@refinecheck > .@safe) { set .@refinecheck,.@refinecheck - .@safe; mes "[" + getarg(0) + "]"; mes "This will try to refine the equipment " + .@refinecheck + " times past the safe limit. Ok?"; next; if(select("Yes...","No...") == 2){ mes "[" + getarg(0) + "]"; mes "You said so... So be it."; close; } } break; case 3: next; mes "[" + getarg(0) + "]"; mes "You said so... So be it."; close; } set .@fullprice,.@price * .@refinecnt; mes "[" + getarg(0) + "]"; mes "That will cost you " + .@refinecnt + " " + getitemname(.@material) + " and " + .@fullprice + " Zeny. Is that ok?"; next; if(select("Yes","No...") == 2){ mes "[" + getarg(0) + "]"; mes "You said so... So be it."; close; } if(countitem(.@material) < .@refinecnt || Zeny < .@fullprice) { mes "[" + getarg(0) + "]"; mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes."; close; } set Zeny,Zeny - .@fullprice; delitem .@material,.@refinecnt; while(.@refinecnt){ if (getequipisequiped(.@part) == 0) { mes "[" + getarg(0) + "]"; mes "Look here... you don't have any items on..."; close; } if (getequipid(.@part) != .@refineitemid || (.@menu2 == 1 && getequippercentrefinery(.@part) < 100)) { mes "[" + getarg(0) + "]"; mes "Clang... No, but did you imagine I could be so stupid?!"; mes "You changed it..."; mes "Get out before I stun you with my Hammer!!"; close; } if(getarg(2) == 1){ set .@rand,rand(1,3); if (.@rand == 1) { mes "["+ getarg(0) +"]"; mes "Clang! Clang! Clang! Clang!"; successrefitem .@part; next; emotion e_no1; mes "["+ getarg(0) +"]"; mes "Good! Succes!!!"; mes "I am the best Blacksmith."; close; } else { mes "["+ getarg(0) +"]"; mes "Clang! Clang! Clang! Clang!"; atcommand "@refine "+ .@down[.@part -1] +" -1"; next; emotion (!rand(5))?e_cash:e_omg; mes "["+ getarg(0) +"]"; mes "Ahhh!!!"; next; mes "["+ getarg(0) +"]"; mes "Oh my!"; mes "The upgrade level has dropped..."; mes "There could've been made an mistake even though I am the best ever."; mes "It was out of my hands."; next; mes "["+ getarg(0) +"]"; mes "I will do a better job next time! Don't worry!"; close; } } set .@rand,rand(100); if (getequippercentrefinery(.@part) > .@rand) { mes "Clang! Clang! Clang! Clang!"; successrefitem .@part; next; emotion e_no1; mes "["+ getarg(0) +"]"; mes "Good! Succes!!!"; mes "I am the best Blacksmith."; close; } else { mes "["+ getarg(0) +"]"; mes "Clang! Clang! Clang! Clang!"; atcommand "@refine "+ .@down[.@part -1] +" -1"; next; emotion (!rand(5))?e_cash:e_omg; mes "["+ getarg(0) +"]"; mes "Ahhh!!!"; next; mes "["+ getarg(0) +"]"; mes "Oh my!"; mes "The upgrade level has dropped..."; mes "There could've been made an mistake even though I am the best ever."; mes "It was out of my hands."; next; mes "["+ getarg(0) +"]"; mes "I will do a better job next time! Don't worry!"; close; } } mes "[" + getarg(0) + "]"; mes "All finished... Come again soon."; close; } // Ori/Elu to Carnium/Bradium Refiners //============================================================ - script Austry#ref2 -1,{ mes "[Austry]"; mes "If you bring me 3"; mes "Oridecon or Elunium"; mes "I can exchange them for"; mes "Bradium or Carnium."; mes "Just give me 50,000z."; next; switch(select("Oridecon to Bradium.:Elunium to Carnium.:Purified Bradium to Carnium.:No thanks.")) { case 1: setarray .@i[0],984,3,6224; //Oridecon -> Bradium break; case 2: setarray .@i[0],985,3,6223; //Elunium -> Carnium break; case 3: setarray .@i[0],6090,1,6223; //Purified_Bradium -> Carnium break; case 4: mes "[Austry]"; mes "Hmm..."; close; } if (countitem(.@i[0]) >= .@i[1] && Zeny >= 50000) { delitem .@i[0],.@i[1]; set Zeny, Zeny - 50000; getitem .@i[2],1; mes "[Austry]"; if (.@i[0] == 6090) { mes "Refining with Purified Bradium"; mes "is a little expensive. I can"; mes "trade it for some Carnium."; } else mes "Ok! Here is your "+getitemname(.@i[2])+"."; mes "Take it and use it well."; close; } mes "[Austry]"; mes "You better not be trying"; mes "to cheat me because you"; mes "don't have enough zeny"; mes "or "+getitemname(.@i[0])+"."; close; } prt_in,85,71,5 duplicate(Austry#ref2) Austry#prt2 56 payon_in01,14,125,5 duplicate(Austry#ref2) Austry#pay2 56 morocc_in,60,38,5 duplicate(Austry#ref2) Austry#moc2 56
-
Using refiner in rAthena svn prontera,154,174,5 script Bestry#prt2 826,{ callfunc "refinenew2","Bestry",0,0; end; } morocc_in,64,41,5 script Bestry#moc2 826,{ callfunc "refinenew2","Bestry",0,0; end; } payon_in01,18,132,3 script Bestry#pay2 826,{ callfunc "refinenew2","Bestry",0,0; end; } //============================================================ // +11 and above Refiner Function //============================================================ //= To allow auto safe refining/multiple refining set the //= second argument to '1' in the function call. //= If you enable this function, be sure to edit the value of //= .@safe to the max safe refine in refine_db.txt as well. //= //= The official script uses a command which seems to generate a //= random result upon refining: success, downgrade, or failure. //= To enable that feature, set the third argument to '1' in the //= function call. Otherwise, the chance in refine_db.txt is used. //============================================================ function script refinenew2 { mes "["+ getarg(0) +"]"; mes "I am the best Blacksmith ever!"; next; mes "["+ getarg(0) +"]"; mes "What do you want to have refined?"; next; setarray .@position$[1],"Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3"; set .@menu$,""; for(set .@i,1; .@i<=10; set .@i,.@i+1) { if(getequipisequiped(.@i)) set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$ + ":"; } set .@part,select(.@menu$); if(!getequipisequiped(.@part)) { mes "[" + getarg(0) + "]"; mes "You're not wearing"; mes "anything there that"; mes "I can refine."; emotion e_an; close; } //Check if the item is refinable... if(!getequipisenableref(.@part)) { mes "[" + getarg(0) + "]"; mes "I don't think I can"; mes "refine this item at all..."; close; } //Check if the item is identified... (Don't know why this is in here... but kept it anyway) if(!getequipisidentify(.@part)) { mes "[" + getarg(0) + "]"; mes "You can't refine this"; mes "if you haven't appraised"; mes "it first. Make sure your"; mes "stuff is identified before"; mes "I can refine it."; close; } if(getequiprefinerycnt(.@part) > 9) { mes "["+ getarg(0) +"]"; mes "I can't refine this"; mes "any more. This is as"; mes "refined as it gets!"; close; } set .@refineitemid, getequipid(.@part); // save id of the item set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) { set .@material,6224; set .@price,100000; set .@safe,10; mes "["+ getarg(0) +"]"; mes "Hmm a weapon, is that ok?"; mes "If you want to refine this weapon,"; mes "I will need 1 ^003366Bradium^000000 and 100,000 zeny."; mes "Are you sure you want to continue?"; } else { set .@material,6223; set .@price,100000; set .@safe,10; mes "["+ getarg(0) +"]"; mes "Hmm an armor, is that ok?"; mes "If you want to refine this armor,"; mes "I will need 1 ^003366Carnium^000000 and 100,000 zeny."; mes "Are you sure you want to continue?"; } next; if(select("Yes:No") == 2){ mes "["+ getarg(0) +"]"; mes "Well, no challenge is one way..."; mes "No risk... that could be wise."; close; } if(getarg(1) != 1) { if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) { mes "["+ getarg(0) +"]"; mes "This weapon already has been refined serveral times."; next; mes "["+ getarg(0) +"]"; mes "You could have the upgrade level of the weapon decreased."; } else { mes "["+ getarg(0) +"]"; mes "You could have the upgrade level of the armor decreased."; } next; mes "["+ getarg(0) +"]"; mes "Do you want me to refine it?"; mes "I think I gave you enough warnings."; next; if(select("Yes.:No.") == 2) { mes "["+ getarg(0) +"]"; mes "Well, no challenge is one way.."; mes "No risk.. that could be wise."; close; } if(countitem(.@material) < 1 || Zeny < .@price) { mes "["+ getarg(0) +"]"; mes "Hm, it seems you don't have enough materials or money."; mes "Please check it out."; close; } set Zeny,Zeny - .@price; delitem .@material,1; if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?) mes "[" + getarg(0) + "]"; mes "Look here... you don't have any items on..."; close; } if(getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item mes "[" + getarg(0) + "]"; emotion e_an; mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } if(getarg(2) == 1){ set .@rand,rand(1,3); if (.@rand == 1) { mes "Clang! Clang! Clang! Clang!"; successrefitem .@part; next; emotion e_no1; mes "["+ getarg(0) +"]"; mes "Good! Succes!!!"; mes "I am the best Blacksmith."; close; } else { mes "["+ getarg(0) +"]"; mes "Clang! Clang! Clang! Clang!"; downrefitem .@part; next; emotion (!rand(5))?e_cash:e_omg; mes "["+ getarg(0) +"]"; mes "Ahhh!!!"; next; mes "["+ getarg(0) +"]"; mes "Oh my!"; mes "The upgrade level has dropped..."; mes "There could've been made an mistake even though I am the best ever."; mes "It was out of my hands."; next; mes "["+ getarg(0) +"]"; mes "I will do a better job next time! Don't worry!"; close; } } set .@rand,rand(100); if (getequippercentrefinery(.@part) > .@rand) { mes "Clang! Clang! Clang! Clang!"; successrefitem .@part; next; emotion e_no1; mes "["+ getarg(0) +"]"; mes "Good! Succes!!!"; mes "I am the best Blacksmith."; close; } else { mes "["+ getarg(0) +"]"; mes "Clang! Clang! Clang! Clang!"; downrefitem .@part; next; emotion (!rand(5))?e_cash:e_omg; mes "["+ getarg(0) +"]"; mes "Ahhh!!!"; next; mes "["+ getarg(0) +"]"; mes "Oh my!"; mes "The upgrade level has dropped..."; mes "There could've been made an mistake even though I am the best ever."; mes "It was out of my hands."; next; mes "["+ getarg(0) +"]"; mes "I will do a better job next time! Don't worry!"; close; } } // New +11 and above Refining Functions ======================== if(getequiprefinerycnt(.@part) < .@safe) { mes "[" + getarg(0) + "]"; mes "I can refine this to the safe limit or a desired number of times. It's your choice."; next; set .@menu2,select("To the safe limit, please.","I'll decide how many times.","I've changed my mind..."); } else set .@menu2,2; switch(.@menu2){ case 1: set .@refinecnt,.@safe - getequiprefinerycnt(.@part); break; case 2: next; mes "[" + getarg(0) + "]"; mes "How many times would you like me to refine your item?"; next; input .@refinecnt; set .@refinecheck,.@refinecnt + getequiprefinerycnt(.@part); if (.@refinecnt < 1 || .@refinecheck > 10) { mes "[" + getarg(0) + "]"; mes "I can't refine this item that many times."; close; } if(.@refinecheck > .@safe) { set .@refinecheck,.@refinecheck - .@safe; mes "[" + getarg(0) + "]"; mes "This will try to refine the equipment " + .@refinecheck + " times past the safe limit. Ok?"; next; if(select("Yes...","No...") == 2){ mes "[" + getarg(0) + "]"; mes "You said so... So be it."; close; } } break; case 3: next; mes "[" + getarg(0) + "]"; mes "You said so... So be it."; close; } set .@fullprice,.@price * .@refinecnt; mes "[" + getarg(0) + "]"; mes "That will cost you " + .@refinecnt + " " + getitemname(.@material) + " and " + .@fullprice + " Zeny. Is that ok?"; next; if(select("Yes","No...") == 2){ mes "[" + getarg(0) + "]"; mes "You said so... So be it."; close; } if(countitem(.@material) < .@refinecnt || Zeny < .@fullprice) { mes "[" + getarg(0) + "]"; mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes."; close; } set Zeny,Zeny - .@fullprice; delitem .@material,.@refinecnt; while(.@refinecnt){ if (getequipisequiped(.@part) == 0) { mes "[" + getarg(0) + "]"; mes "Look here... you don't have any items on..."; close; } if (getequipid(.@part) != .@refineitemid || (.@menu2 == 1 && getequippercentrefinery(.@part) < 100)) { mes "[" + getarg(0) + "]"; mes "Clang... No, but did you imagine I could be so stupid?!"; mes "You changed it..."; mes "Get out before I stun you with my Hammer!!"; close; } if(getarg(2) == 1){ set .@rand,rand(1,3); if (.@rand == 1) { mes "["+ getarg(0) +"]"; mes "Clang! Clang! Clang! Clang!"; successrefitem .@part; next; emotion e_no1; mes "["+ getarg(0) +"]"; mes "Good! Succes!!!"; mes "I am the best Blacksmith."; close; } else { mes "["+ getarg(0) +"]"; mes "Clang! Clang! Clang! Clang!"; downrefitem .@part; next; emotion (!rand(5))?e_cash:e_omg; mes "["+ getarg(0) +"]"; mes "Ahhh!!!"; next; mes "["+ getarg(0) +"]"; mes "Oh my!"; mes "The upgrade level has dropped..."; mes "There could've been made an mistake even though I am the best ever."; mes "It was out of my hands."; next; mes "["+ getarg(0) +"]"; mes "I will do a better job next time! Don't worry!"; close; } } set .@rand,rand(100); if (getequippercentrefinery(.@part) > .@rand) { mes "Clang! Clang! Clang! Clang!"; successrefitem .@part; next; emotion e_no1; mes "["+ getarg(0) +"]"; mes "Good! Succes!!!"; mes "I am the best Blacksmith."; close; } else { mes "["+ getarg(0) +"]"; mes "Clang! Clang! Clang! Clang!"; downrefitem .@part; next; emotion (!rand(5))?e_cash:e_omg; mes "["+ getarg(0) +"]"; mes "Ahhh!!!"; next; mes "["+ getarg(0) +"]"; mes "Oh my!"; mes "The upgrade level has dropped..."; mes "There could've been made an mistake even though I am the best ever."; mes "It was out of my hands."; next; mes "["+ getarg(0) +"]"; mes "I will do a better job next time! Don't worry!"; close; } } mes "[" + getarg(0) + "]"; mes "All finished... Come again soon."; close; } // Ori/Elu to Carnium/Bradium Refiners //============================================================ - script Austry#ref2 -1,{ mes "[Austry]"; mes "If you bring me 3"; mes "Oridecon or Elunium"; mes "I can exchange them for"; mes "Bradium or Carnium."; mes "Just give me 50,000z."; next; switch(select("Oridecon to Bradium.:Elunium to Carnium.:Purified Bradium to Carnium.:No thanks.")) { case 1: setarray .@i[0],984,3,6224; //Oridecon -> Bradium break; case 2: setarray .@i[0],985,3,6223; //Elunium -> Carnium break; case 3: setarray .@i[0],6090,1,6223; //Purified_Bradium -> Carnium break; case 4: mes "[Austry]"; mes "Hmm..."; close; } if (countitem(.@i[0]) >= .@i[1] && Zeny >= 50000) { delitem .@i[0],.@i[1]; set Zeny, Zeny - 50000; getitem .@i[2],1; mes "[Austry]"; if (.@i[0] == 6090) { mes "Refining with Purified Bradium"; mes "is a little expensive. I can"; mes "trade it for some Carnium."; } else mes "Ok! Here is your "+getitemname(.@i[2])+"."; mes "Take it and use it well."; close; } mes "[Austry]"; mes "You better not be trying"; mes "to cheat me because you"; mes "don't have enough zeny"; mes "or "+getitemname(.@i[0])+"."; close; } prt_in,85,71,5 duplicate(Austry#ref2) Austry#prt2 826 payon_in01,14,125,5 duplicate(Austry#ref2) Austry#pay2 826 morocc_in,60,38,5 duplicate(Austry#ref2) Austry#moc2 826
-
http://www.eathena.ws/board/index.php?showtopic=191213&hl=Emperium+Breaker http://www.eathena.ws/board/index.php?showtopic=274464 http://pastebin.com/37Ww0xak (google search)
-
@AnnieRuru You forgot to post getitemname2's function.
-
It's the time in seconds of #PremiumUser variable. Use callfunc("Time2Str",<your value>); to display in days/hour/min/secs
-
Refine max to +12, 200K Zeny and enriched elu per refine... If player have Silver Coins or Platinum Coins (conditions like your request), NPC ask if he wants to use it. If he use it, 100% success else random fail. prontera,159,175,5 script hjkqsdfl 456,{ mes "[blacksmith]"; mes "I'm the Blacksmith."; mes "I can refine all kinds of weapons, armor and equipment, so let me"; mes "know what you want me to refine."; next; for( .@i = 1; .@i <= getarraysize( .position$ ); .@i++ ) { if( getequipisequiped( .@i ) ) .@menu$ = .@menu$ + .position$[.@i] +"-"+ "["+ getequipname(.@i) +"]"; .@menu$ = .@menu$ +":"; } .@part = select( .@menu$ ); if( !getequipisequiped( .@part ) ) { mes "[blacksmith]"; mes "You're not wearing"; mes "anything there that"; mes "I can refine."; emotion 6; close; } //Check if the item is refinable... // -------------------------------- if( !getequipisenableref( .@part ) ) { mes "[blacksmith]"; mes "I don't think I can"; mes "refine this item at all..."; close; } //Check if the item is identified... (Don't know why this is in here... but kept it anyway) // ---------------------------------------------------------------------------------------- if( !getequipisidentify( .@part ) ) { mes "[blacksmith]"; mes "You can't refine this"; mes "if you haven't appraised"; mes "it first. Make sure your"; mes "stuff is identified before"; mes "I can refine it."; close; } // Check to see if the items is already +12 // ---------------------------------------- if( getequiprefinerycnt( .@part ) > 11 ) { mes "[blacksmith]"; mes "I can't refine this"; mes "any more. This is as"; mes "refined as it gets!"; close; } .@item_id = getequipid( .@part ); .@ref = getequipweaponlv( .@part ); .@refine_save = getequiprefinerycnt( .@part ); next; switch( select( ( .@refine_save < .safe[ .@ref ] ? "Safe limit, please." : "" ), "I want to refine X times", "I've changed my mind..." ) ) { case 1: .@r_cnt = .safe[ .@ref ] - .@refine_save; break; case 2: mes "[blacksmith]"; mes "How many refine do you want to do ?"; if( input( .@r_cnt, 1, ( .maxrefine - .@refine_save ) ) != 0 ) { mes "I can't do that !"; close; } next; break; case 3: mes "[blacksmith]"; mes "You said so... So be it."; close; } mes "[blacksmith]"; mes "To refine this I need"; mes "^FF0000"+ ( .@r_cnt * .cost_zeny ) +" Zeny^000000 and "+ .@r_cnt +" Enriched Elunium"; mes "Do you really wish to continue?"; next; if( select( "Yes:No" ) -1 ) { mes "[blacksmith]"; mes "Yeah..."; mes "There's no need to"; mes "rush. Take your time."; close; } if( .@r_cnt * .cost_zeny > Zeny || .@r_cnt > countitem( .Enriched_elu ) ) { mes "[blacksmith]"; mes "You don't seem to have"; mes "enough ^000000 material^000000..."; mes "Go get some more. I'll be"; mes "here all day if you need me."; close; } if( !getequipisequiped( .@part ) ) { // hacker has removed the item (not changed, why?) mes "[blacksmith]"; mes "Look here... you don't have any Items on..."; close; } if( getequiprefinerycnt( .@part ) != .@refine_save || getequipid( .@part ) != .@item_id ) { // hacker has changed the item emotion e_an; mes "[blacksmith]"; mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } for( .@i = 0; .@i < .@r_cnt; .@i++ ) { Zeny -= .cost_zeny; delitem .Enriched_elu, 1; if( getequiprefinerycnt( .@part ) < .safe[ .@ref ] ) successrefitem .@part; else { .@coin = ( getequiprefinerycnt( .@part ) < 10 && countitem( .silver_coin ) ? .silver_coin : ( getequiprefinerycnt( .@part ) > 9 && countitem( .plat_coin ) ? .plat_coin : 0 ) ); if( .@coin ) if( select( "Use an "+ getitemname( .@coin ), "Don't use it." ) == 1 ) { delitem .@coin, 1; .@skip = 1; } if( getequippercentrefinery( .@part ) <= rand(100) && !.@skip ) { failedrefitem .@part; next; mes "[blacksmith]"; emotion ( !rand(5) ) ? e_cash: e_omg; .@lose = rand(2); if( !.@lose ) { mes "OH! MY GOD!"; mes "Damn it! Not again!"; mes "I'm terribly sorry, but you know practice does make perfect."; mes "Um, right? Heh heh..."; } else if( .@lose -1 ) { mes "Nooooooo!"; mes "It broke!"; mes "I-I'm sorry!"; } else { mes "Crap!"; mes "It couldn't take"; mes "much more tempering!"; mes "Sorry about this..."; } close; } .@skip = 0; successrefitem .@part; } } emotion e_heh; .@win = rand(2); mes "[blacksmith]"; if( !.@win ) { mes "Perfect!"; mes "Heh heh!"; mes "Once again,"; mes "flawless work"; mes "from the master~"; } else if( .@win -1 ) { mes "Success...!"; mes "Yet again, my amazing"; mes "talent truly dazzles"; mes "and shines today."; } else { mes "Heh heh!"; mes "I'm all done."; mes "No doubt, my work is"; mes "to your satisfaction."; mes "Sheer, utter perfection~"; } close; OnInit: setarray .position$[1], "^0000ffHead^000000","^0000ffBody^000000","^FF0000Left hand^000000","^FF0000Right hand^000000","^0000ffRobe^000000","^0000ffShoes^000000","Accessory 1","Accessory 2","^0000ffHead 2^000000","^0000ffHead 3^000000"; // Safe limit per equipment // ------------------------ setarray .safe, 4, 7, 6, 5, 4, 4; // Max refine // ---------- .maxrefine = 12; // Required // -------- .cost_zeny = 200000; .plat_coin = 677; .silver_coin = 675; .Enriched_elu = 7619; end; }
-
@AnnieRuru There is a small error in typo for .peak_date_time$ .peak_date_time = gettime(8); $peak_date$ = .peak_date_num +" "+ .peak_date_time$; >> .peak_date_time