Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. http://rathena.org/board/topic/85794-no-reborn-job-changer/?p=214664
  2. This issue is not related to script npc. Please use the bug tracker if you think it's a bug. Thanks you.
  3. prontera,151,189,6 script Kuya Elly Healer 899,{ function AddBuff; if ( getgmlevel() >= .gmlevel ) callsub L_GMConfig; for( ; .@i < .size_buff; set .@i, .@i +1 ) { if ( $buffconf & ( 1 << .@i ) ) sc_start .buffcode[.@i],.buffduration*60*1000,.bufflevl[.@i]; } percentheal 100,100; end; L_GMConfig: mes .npcname$; mes "Good day, GM "+strcharinfo(0)+"."; mes "What kind of change you want to make today ?"; next; switch( select( "~ Add / Remove a Buff", "~ Set all back to Default", "~ Turn on all the buff", "~ Give me Heal and Buff" ) ) { case 1: while(1) { for( set .@i, 0; .@i < .size_buff; set .@i, .@i +1 ) { set .@color$, ( $buffconf & ( 1 << .@i ) ) ? "^49b01c" : "^FF0000" ; set .@bufflist$, .@bufflist$ + .@color$ + .buffstr$[.@i] +"^000000" +":"; } next; set .@s, select( .@bufflist$ ) -1; set $buffconf, $buffconf ^ ( 1 << .@s ); next; mes .npcname$; mes "You have "+ ( $buffconf & ( 1 << .@s ) ? "added" : "removed" ) +" ^3c9cff"+ .buffstr$[.@s] +"^000000."; mes "Do you want to continue ?"; next; if( select("Yes:No")==2 ) end; set .@bufflist$, ""; } case 2: mes .npcname$; mes "Are you sure to revert all the changes back to default ?"; mes "^ff0000NOTE : THIS WILL REMOVE ALL YOUR PREVIOUS CONFIGURATION."; next; if(select("No:Yes") == 2) set $buffconf, 3; end; case 3: mes .npcname$; mes "Are you sure to turn ON all the Buff ?"; next; if(select("No:Yes") == 2) { for( set .@i, 0; .@i < .size_buff; set .@i, .@i +1 ) set $buffconf, $buffconf | ( 1 << .@i ); } end; case 4: return; } OnInit: //Default Buff is Blessing and Increase Agility // <skill lvl>, <sc_ const>, <skill name to display> AddBuff( 10, 30, "Blessing" ); AddBuff( 10, 32, "Increase Agility" ); AddBuff( 3, 36, "Suffragium" ); AddBuff( 5, 37, "Aspersio" ); AddBuff( 5, 44, "Weapon Perfection" ); AddBuff( 5, 45, "Over Thrust" ); AddBuff( 5, 72, "Weapon CP" ); AddBuff( 5, 73, "Shield CP" ); AddBuff( 5, 74, "Armor CP" ); AddBuff( 5, 75, "Helm CP" ); AddBuff( 5, 110,"Concentration" ); AddBuff( 5, 115,"Assumptio" ); AddBuff( 7, 147,"Kaizel" ); AddBuff( 7, 148,"Kaahi" ); AddBuff( 3, 149,"Kaupe" ); AddBuff( 10, 120,"True Sight" ); AddBuff( 10, 121,"Wind Walk" ); AddBuff( 10, 175,"Poem of Bragis" ); AddBuff( 10, 203,"Food Str +10" ); AddBuff( 10, 204,"Food Agi +10" ); AddBuff( 10, 205,"Food Int +10" ); AddBuff( 10, 206,"Food Vit +10" ); AddBuff( 10, 207,"Food Dex +10" ); AddBuff( 10, 208,"Food Luk +10" ); if ( $buffconf == 0 ) set $buffconf, 3;// default // --------------------------------------------------------------------- // -- Basic Configuration -- // This is the basic configuration // --------------------------------------------------------------------- set .npcname$,"[ ^3a68ffHealer^000000 ]"; set .gmlevel,99; // Min GM Level to do in-game configuration (See conf/groups.conf for group_id's lists) set .buffduration,5; // Buff Duration in minute waitingroom "Kuya Elly Healer",0; end; // --------------------------------------------------------------------- function AddBuff { set .bufflevl[ .size_buff ], getarg(0); set .buffcode[ .size_buff ], getarg(1); set .buffstr$[ .size_buff ], getarg(2); set .size_buff, .size_buff +1; } }
  4. trunk/doc/item_db.txt You can use a scientific calculator instead of doing manual calculation if you're not sure or use this tool by Myzter http://rathena.org/board/topic/83421-tool-bitmask-calculator-item-jobs-monster-mode/#entry204325
  5. Disabled gvg in trunk/npc/mapflag/gvg.txt
  6. - script helloworld -1,{ OnInit: .itemID = 671; // Edit your item here .amount_item = 100;// amount items to throw monster "prt_fild08",0,0,"I'm a Poring",1002,1,strnpcinfo(0) + "::OnMyMobDead"; end; OnMyMobDead: announce "The mob is now killed, the special drop is ready to catch in all maps.", 0; .@map$ = strcharinfo(3); while( .@i < .amount_item ) { do { .@x = rand( 1,300 ); .@y = rand( 1,300 ); } while( !checkcell( .@map$,.@x,.@y,cell_chkpass ) ); makeitem .itemID,1, .@map$, .@x, .@y; .@i++; } end; } It's a sample. The monster spawn when the server start..
  7. I suggest you to try the redo http://rathena.org/board/topic/77632-devil-square/ and add the diff @@ -99,6 +99,7 @@ OnClock1600: OnClock1800: OnClock2000: OnClock2200: + if( .start ) end; .start = 1; disablenpc "Exit#DS"; mapannounce "ordeal_1-1","Devil Square is now closed", bc_map; @@ -120,6 +121,7 @@ OnClock2200: goto L_End; .start = 2; donpcevent strnpcinfo(0)+"::OnSurvive"; + donpcevent strnpcinfo(0)+"::OnIdle"; .round = 1; .mob = 75; areamonster "ordeal_1-1",183,182,246,244,"[DS] SOLDIER SKELETON",1028,10,strnpcinfo(0)+"::Ondevildead"; @@ -231,6 +233,17 @@ OnSurvive: sleep .ann_survive; } end; + +OnIdle: + sleep 120000; // wait 120 secs + while( .start ) { + sleep 2000; + for( .@i = 0; .@i < .register_num; .@i++ ) { + if ( checkidle( rid2name( .register_aid[.@i] ) ) >= 120 ) + unitkill .register_aid[.@i]; + } + } + end; } ordeal_1-1,246,245,7 script Exit#DS 51,{
  8. 1/ Replace waitingroom getmapusers("prontera")+" player"+( getmapusers("prontera") > 1 ? "s":"") +" in Prontera", 0; by waitingroom getusers(1) +" player"+( getusers(1) > 1 ? "s":"") +" in the whole server", 0; 2/ prontera,155,186,5 script Server Time(+8GMT) 790,{ end; OnInit: while(1) { delwaitingroom; waitingroom "Clock "+ gettimestr( "%I:%M:%S %p",21 ),0; sleep 1000; } } 3/ Replace if (.@Delay) set @HD, gettimetick(2)+.@Delay; end; } by if (.@Delay) set @HD, gettimetick(2)+.@Delay; delwaitingroom; waitingroom strcharinfo(0) +" is healed",0; end; }
  9. Find and replace this setarray .@position$[1], "Headgear","Armor","Shield","Invalid","Garment","Footgear"; set .@menu$,""; deletearray .@arr; set .@j, 1; for( set .@i,1; .@i <= 6; set .@i,.@i+1 ) { if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { // Only catch shields set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@arr[.@j], .@i; set .@j, .@j + 1; set .@menu$, .@menu$ + ":"; } if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) { set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@arr[.@j], .@i; set .@j, .@j + 1; set .@menu$, .@menu$ + ":"; } } by that setarray .@position$[1], "Headgear","Armor","Shield","Invalid","Garment","Footgear"; set .@menu$,""; deletearray .@arr; set .@j, 1; for( set .@i,2; .@i <= 2; set .@i,.@i+1 ) { if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { // Only catch shields set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@arr[.@j], .@i; set .@j, .@j + 1; set .@menu$, .@menu$ + ":"; } if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) { set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@arr[.@j], .@i; set .@j, .@j + 1; set .@menu$, .@menu$ + ":"; } }
  10. - script WOE_BLOCK -1,{ OnAgitStart: OnAgitStart2: // When WOE starts, kick all GMs. addrid(0); OnPCLoadMapEvent: if ( getgmlevel() > 60 && ( agitcheck() || agitcheck2() ) && compare( strcharinfo(3),"g_cas0" ) ) { dispbottom "You can't warp in a castle during woe."; warp "prontera",0,0; } end; } aldeg_cas01 mapflag loadevent aldeg_cas02 mapflag loadevent aldeg_cas03 mapflag loadevent aldeg_cas04 mapflag loadevent aldeg_cas05 mapflag loadevent payg_cas01 mapflag loadevent payg_cas02 mapflag loadevent payg_cas03 mapflag loadevent payg_cas04 mapflag loadevent payg_cas05 mapflag loadevent prtg_cas01 mapflag loadevent prtg_cas02 mapflag loadevent prtg_cas03 mapflag loadevent prtg_cas04 mapflag loadevent prtg_cas05 mapflag loadevent gefg_cas01 mapflag loadevent gefg_cas02 mapflag loadevent gefg_cas03 mapflag loadevent gefg_cas04 mapflag loadevent gefg_cas05 mapflag loadevent Try this version Post a screenshot of your mapserv error (if you have one) Tell us what is your emulator (rathena?) and the version. For example addrid is a new command in rathena, other emu and old version doesn't support this script.
  11. I don't understand your request. Can you re-explain ?
  12. In your last reply there is a typo OnPCLoadMapEvent: if ( getgmlevel() > 0 && ( agitcheck() || agitcheck2() ) && compare( strcharinfo(3),"g_cas0" ) ) { dispbottom "You can't warp in a castle during woe."; warp "prontera",0,0; } end; )// <------- must be } This script is working on my test server. What is your emulator? the version? do you have any errors on your console?
  13. /me return the hugs xD From my test makeitem doesn't allow randoms coordinates (create nothing)... but I have a doubt about the request. You want throw some items in all maps of the game even if there is none player?
  14. trunk/npc/custom/card_remover.txt
  15. or with addrid *stole a part of Joseph's script* - script helloworld -1,{ OnInit: .itemID = 671; // Edit your item here monster "prt_fild08",0,0,"I'm a Poring",1002,1,strnpcinfo(0) + "::OnMyMobDead"; end; OnMyMobDead: announce "The mob is now killed, the special drop is ready to catch in all maps.", 0; donpcevent strnpcinfo(0) + "::OnInit"; addrid 0; if ( checkvending() ) end; makeitem .itemID,1,"this",0,0; end; }
  16. It's using hexadecimal. 80000+20000+800 = A0800
  17. CREATE DATABASE `site_alan`; CREATE TABLE `site_alan`.`fama` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `foto` VARCHAR( 100 ) NOT NULL , `nome` VARCHAR( 100 ) NOT NULL , `nick` VARCHAR( 100 ) NOT NULL , `classe` VARCHAR( 100 ) NOT NULL , `cla` VARCHAR( 100 ) NOT NULL , `idade` VARCHAR( 100 ) NOT NULL , `mora` VARCHAR( 100 ) NOT NULL ) ENGINE = MYISAM; CREATE TABLE `site_alan`.`regras` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `regra` TEXT NOT NULL ) ENGINE = MYISAM; CREATE TABLE `site_alan`.`download` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `versao_pat` VARCHAR( 50 ) NOT NULL , `tamanho_pat` VARCHAR( 50 ) NOT NULL , `link_pat` TEXT NOT NULL , `episodio_bro` VARCHAR( 50 ) NOT NULL , `tamanho_bro` VARCHAR( 50 ) NOT NULL , `link_bro` TEXT NOT NULL ) ENGINE = MYISAM; CREATE TABLE `site_alan`.`equipe` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `cargo` VARCHAR( 50 ) NOT NULL , `nome` VARCHAR( 50 ) NOT NULL , `especi` TEXT NOT NULL ) ENGINE = MYISAM; CREATE TABLE `site_alan`.`noticias` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `titulo` TEXT NOT NULL , `noticia` TEXT NOT NULL , `data` VARCHAR( 20 ) NOT NULL , `por` VARCHAR( 50 ) NOT NULL ) ENGINE = MYISAM; CREATE TABLE `site_alan`.`eventos` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `titulo` TEXT NOT NULL , `evento` TEXT NOT NULL , `data` VARCHAR( 20 ) NOT NULL ) ENGINE = MYISAM; CREATE TABLE `site_alan`.`admin` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `usuario` VARCHAR( 50 ) NOT NULL , `senha` VARCHAR( 50 ) NOT NULL , `privilegio` VARCHAR( 2 ) NOT NULL ) ENGINE = MYISAM; You forgot to remove ") of mysql_query
  18. Remove the mysql_query(", like that CREATE DATABASE `site_alan`; same about the tables
  19. oO you're right, implode is much effective.
  20. for(set .@i,1; .@i <= .@frank; set .@i,.@i++) { mes .@i+". ["+.@n$[0]+"] ("+.@fl[0]+") ("+.@fe[0]+") ("+.@fp[0]+") ("+.@fc[0]+")"; //cutin $FishingLadderRank$,3; } must be for(set .@i,0; .@i < .@frank; set .@i,.@i++) { mes (.@i+1) +". ["+ .@n$[.@i] +"] ("+.@fl[.@i]+") ("+.@fe[.@i]+") ("+.@fp[.@i]+") ("+.@fc[.@i]+")"; //cutin $FishingLadderRank$,3; } to display all values in the arrays Some comments function script Fishing_Exp { callfunc "Fishing_Points"; set .@fe,FishingNowExp; if(query_sql("SELECT `fexp` FROM `fishing_system` WHERE `name`='"+strcharinfo(0)+"'",.@fe )) { set .@size, getarraysize($FishingEquips);// computation before to avoid multiple computation in the loop for (.@i = 0; .@i < .@size; .@i++) if(isequipped($FishingEquips[.@i]))// don't know if it's working as intended... but if the player equip multiple item at once, he got more exp set FishingNowExp,FishingNowExp+$FishingEquipsExp[.@i]; set .@fe,FishingNowExp;// I think you forgot to update the new exp for the query query_sql("UPDATE `fishing_system` SET `fexp`='"+.@fe+"' WHERE `name`='"+strcharinfo(0)+"'"); } else query_sql("INSERT INTO `fishing_system` (`account_id`,`char_id`,`name`,`itemID`,`itemcount`,`flevel`,`fexp` ) VALUES ('"+getcharid(3)+"','"+getcharid(0)+"','"+ escape_sql( strcharinfo(0) ) +"','0','0','0','"+ .@fe +"' )");// no need escape sql for a number.. but for the name yes if( FishingNowExp >= $FishingExpMax[ FishingLevel ] ) { for ( set .@i, 1 ; .@i <= $FRankUpCutins ; set .@i, .@i + 1 ) { cutin $FRankUpPicNames$ + .@i, 1 ; sleep2 $FLRankPerPic; set .@fl,FishingLevel; } if(query_sql("SELECT `flevel` FROM `fishing_system` WHERE `name`='"+ escape_sql( strcharinfo(0) ) +"'",.@fl )){ set FishingLevel, FishingLevel + 1 ; set FishingNowExp, 0 ; dispbottom "Congratulations! Fishing Rank is promoted to ^ff0000" + $FishingLevelName$[ FishingLevel ] + "^000000" ; query_sql("UPDATE `fishing_system` SET `flevel`='"+.@fl+"' WHERE `name`='"+ escape_sql( strcharinfo(0) ) +"'"); } else { query_sql("INSERT INTO `fishing_system` (`account_id`,`char_id`,`name`,`flevel` ) VALUES ('"+getcharid(3)+"','"+getcharid(0)+"','"+ escape_sql( strcharinfo(0) ) +"','0','0','"+ .@fl +"' )"); } for (.@i = 0; .@i < getarraysize($SpecialFXLVL); .@i++) specialeffect2 $SpecialFXLVL[.@i]; } if( FishingLevel >= 50) set FishingNowExp,FishingNowExp + 0;// + 0 ?? what's the point? return ; } function script Fishing_Points { if($FishingPointsToggle == 1) { set .@fp,#FishingPoints; if(query_sql("SELECT `fpoints` FROM `fishing_system` WHERE `name`='"+ escape_sql( strcharinfo(0) ) +"'",.@fp )){ for (.@i = 0; .@i < getarraysize($FishingEquips); .@i++) if(isequipped($FishingEquips[.@i])) set #FishingPoints,#FishingPoints+$FishingEquipsPts[.@i]; set #FishingPoints,#FishingPoints+$FishingPoints[FishingLevel]; set .@fp,#FishingPoints;// You forgot to update the new points for the query query_sql("UPDATE `fishing_system` SET `fpoints`='"+.@fp+"' WHERE `name`='"+ escape_sql( strcharinfo(0) ) +"'"); } else { query_sql("INSERT INTO `fishing_system` (`account_id`,`char_id`,`name`,`itemID`,`itemcount`,`flevel`,`fexp`,`fpoints` ) VALUES ('"+getcharid(3)+"','"+getcharid(0)+"','"+ escape_sql( strcharinfo(0) ) +"','0','0','0','0','"+ .@fp +"' )"); } } return; }
  21. - script go_restrict -1,{ OnInit: bindatcmd "go",strnpcinfo(3)+"::OnEvent"; end; OnEvent: if ( getgmlevel() < 1 && Class == Job_Novice && JobLevel < 9 ) message strcharinfo(0), "Your Joblevel must be above 8 to use @go command."; else atcommand "@go "+ implode( .@atcmd_parameters$," " ); end; } Edit : replace while by implode
  22. He means separate nomemo of "no mariage skill" [spoiler=For fun] Maybe with a new mapflag nomarriage.patch or easier : Index: skill.c =================================================================== --- skill.c (revision 17477) +++ skill.c (working copy) @@ -521,7 +521,7 @@ case WE_CALLPARTNER: case WE_CALLPARENT: case WE_CALLBABY: - if (map[m].flag.nomemo) { + if (map[m].flag.nowarp || map[m].flag.nowarpto) { clif_skill_teleportmessage(sd,1); return 1; }
  23. In item_combo.txt add (example with ID 5001 and 5074) 5001:5074,{ skill TK_SEVENWIND,4; } In item_db 5001,Headset,Headset,5,20,,200,,3,,0,0xFFFFFFFE,7,2,256,,1,1,87,{},{},{ if( isequipped(5074) ) { sc_end SC_BLESSING; sc_end SC_SEVENWIND; } } 5074,Ear_Of_Angel's_Wing,Angel Wing Ears,5,20,,100,,1,,0,0xFFFFFFFF,7,2,512,,70,0,158,{},{},{ if( isequipped(5001) ) { sc_end SC_BLESSING; sc_end SC_SEVENWIND; } } The if( isequipped(5074) ) { sc_end SC_BLESSING; sc_end SC_SEVENWIND; } will stop blessing and sevenwind when the player will unequip an item having the 2 items equipped
×
×
  • Create New...