Jump to content

Hijirikawa

Members
  • Posts

    193
  • Joined

  • Last visited

  • Days Won

    2

Community Answers

  1. Hijirikawa's post in NPC Collect event was marked as the answer   
  2. Hijirikawa's post in how to attach player in a loop while on a specific map? was marked as the answer   
    Use OnPCLoadMapEvent and addtimer
    - script asdfjkl -1,{ end; OnTick: getitem itm,itm_qty; dispbottom .sec+" second(s) has passed."; addtimer .time,"asdfjkl::OnTick"; end; OnPCLoadMapEvent: dispbottom "You have entered a special zone."; addtimer .time,"asdfjkl::OnTick"; end; OnInit: .time = 3000; .sec = .time/1000; .itm = 501; .itm_qty = 1; end; } prontera mapflag loadevent Untested.
  3. Hijirikawa's post in Requesting Pvp Warper w/ Announcer COntrol was marked as the answer   
    - script asdfjkl -1,{ if(pvp_announce) [email protected]$ = "Warp:[^00ff00Enabled^000000]Announce:Close"; else [email protected]$ = "Warp:[^ff0000Disabled^000000]Announce:Close"; mes "[ PVP Warper ]"; mes "Warp?"; switch(select([email protected]$)){ case 1: close2; warp "prontera",0,0; [email protected]$ = strcharinfo(0); addrid(0); if(pvp_announce){ announce "[ PvP Announcement ]: "[email protected]$+" has entered the PvP Room",bc_blue|bc_self; } end; case 2: if(pvp_announce){ pvp_announce = 0; mes "Announce disabled"; close; } else{ pvp_announce = 1; mes "Announce enabled"; close; } case 3: break; } end; OnInit: .announce = 1; // 0 = off end; } Untested.
  4. Hijirikawa's post in incorrect use of close was marked as the answer   
    Change all your close statements to end;
     
    You should only use close; when there's a mes statement somewhere to avoid that kind of error. In this case, you aren't using any mes, so don't use close;
  5. Hijirikawa's post in Freebie problem was marked as the answer   
    prontera,164,173,4 script Novice Enchantress 521,{ if(Weight > MaxWeight / 2) end; if( Class != 0){ end; } mes "[ ^FF0000Novice Enchantress^000000 ]"; mes "Welcome to ^FF0000RO NAME HERE^000000"; mes "I am here to assist you."; mes "Choose your class and join the adventure."; next; [email protected] = select( .Menu$ ) - 1; if( select( "Change to "+jobname( .JobList[[email protected]] )+"?:Cancel" ) == 1 ){ jobchange .JobList[[email protected]]; BaseLevel = .BaseLevel; JobLevel = .JobLevel; resetskill; resetstatus; set SkillPoint, 0; set SkillPoint, 118; //How many skill points do you want your players to have mes "[ ^FF0000Novice Enchantress^000000 ]"; mes "Welcome to RO NAME HERE."; close2; if(!#freebies){ switch(Class){ case 4008: //knight getitembound2 1108,2,1,10,0,0,0,0,0,1; //blade getitembound2 1408,2,1,10,0,0,0,0,0,1; //pike break; case 4009: //High Priest getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod break; case 4010: //High Wizard getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod break; case 4011: //Whitesmith getitembound2 1302,2,1,10,0,0,0,0,0,1; //axe break; case 4012: //Sniper getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow break; case 4013: //Assassin Cross getitembound2 1208,2,1,10,0,0,0,0,0,1; //main gauche getitembound2 1264,2,1,10,0,0,0,0,0,1; //specialty jur break; case 4015: //Paladin getitembound2 1408,2,1,10,0,0,0,0,0,1; //pike break; case 4016: //Champion getitembound2 1505,2,1,10,0,0,0,0,0,1; //mace break; case 4017: //Professor getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod break; case 4018: //Stalker getitembound2 1108,1,1,10,0,0,0,0,0,1; //blade getitembound2 1208,1,1,10,0,0,0,0,0,1; //main gauche getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow break; case 4019: //Creator getitembound2 1302,2,1,10,0,0,0,0,0,1; //axe break; case 4020: //Bard getitembound2 1902,2,1,10,0,0,0,0,0,1; //violin getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow break; case 4021: //Gypsy getitembound2 1951,2,1,10,0,0,0,0,0,1; //rope getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow break; case 23: //Super Novice getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod getitembound2 1208,2,1,10,0,0,0,0,0,1; //main gauche getitembound2 1108,2,1,10,0,0,0,0,0,1; //blade break; case 24: //Gunslinger getitembound2 13105,2,1,10,0,0,0,0,0,1; //garrison break; case 25: //Ninja getitembound2 1208,2,1,10,0,0,0,0,0,1; //main gauche getitembound2 13302,2,1,10,0,0,0,0,0,1; break; } set #freebies,1; } } end; OnInit: waitingroom "Jobchanger",0; setarray .JobList[0],4008,4009,4010,4011,4012,4013,4015,4016,4017,4018,4019,4020,4021,23,24,25; // class that player can choose from, refer to @jobchange in-game for the numbers .BaseLevel = 99; //max base level of your server .JobLevel = 70; //max job level of your server [email protected] = getarraysize( .JobList ); for( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) .Menu$ = .Menu$ + jobname( .JobList[[email protected]] )+":"; end; } Study how the script looks like, this one should be really easy to understand.
  6. Hijirikawa's post in 2 Custom NPC errors. was marked as the answer   
    Why not use this one? http://pastebin.com/JZgsXCr7credit to owner.
  7. Hijirikawa's post in freebies defends on the class was marked as the answer   
    Just use Class lol...
    switch(Class){ case 4008: //knight getitembound2 1108,2,1,10,0,0,0,0,0,1; //blade getitembound2 1408,2,1,10,0,0,0,0,0,1; //pike break; case 4009: //High Priest getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod break; case 4010: //High Wizard getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod break; case 4011: //Whitesmith getitembound2 1302,2,1,10,0,0,0,0,0,1; //axe break; case 4012: //Sniper getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow break; case 4013: //Assassin Cross getitembound2 1208,2,1,10,0,0,0,0,0,1; //main gauche getitembound2 1264,2,1,10,0,0,0,0,0,1; //specialty jur break; case 4015: //Paladin getitembound2 1408,2,1,10,0,0,0,0,0,1; //pike break; case 4016: //Champion getitembound2 1505,2,1,10,0,0,0,0,0,1; //mace break; case 4017: //Professor getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod break; case 4018: //Stalker getitembound2 1108,1,1,10,0,0,0,0,0,1; //blade getitembound2 1208,1,1,10,0,0,0,0,0,1; //main gauche getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow break; case 4019: //Creator getitembound2 1302,2,1,10,0,0,0,0,0,1; //axe break; case 4020: //Bard getitembound2 1902,2,1,10,0,0,0,0,0,1; //violin getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow break; case 4021: //Gypsy getitembound2 1951,2,1,10,0,0,0,0,0,1; //rope getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow break; case 23: //Super Novice getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod getitembound2 1208,2,1,10,0,0,0,0,0,1; //main gauche getitembound2 1108,2,1,10,0,0,0,0,0,1; //blade break; case 24: //Gunslinger getitembound2 13105,2,1,10,0,0,0,0,0,1; //garrison break; case 25: //Ninja getitembound2 1208,2,1,10,0,0,0,0,0,1; //main gauche getitembound2 13302,2,1,10,0,0,0,0,0,1; break; }
  8. Hijirikawa's post in waiting room script command was marked as the answer   
    *getwaitingroomusers "<NPC object name>"; This command get all the characters in the waiting room of the given NPC and stores their gids in the array [email protected]_users[]. Also, stores the the number of characters in the variable [email protected]_usercount Suppose you could use that.
  9. Hijirikawa's post in R>NPC Changing sprites was marked as the answer   
    morocc,161,90,5 script Poring#test 1002,{ if(.timer == 1) end; mes "Pay me?"; menu "Yes",-; if(zeny < .zeny) end; zeny -= .zeny; setnpcdisplay strnpcinfo(3), "Drops", .disguise; set .timer,1; initnpctimer; end; OnTimer5000: setnpcdisplay strnpcinfo(3), "Poring", .original; set .timer,0; stopnpctimer; end; OnInit: set .disguise, 1113; set .original, 1002; set .zeny, 1; end; } Working like a charm.
  10. Hijirikawa's post in R> Soul Linker NPC(Shop or Auto Soul Link when click) was marked as the answer   
    - script Healer -1,{ [email protected] = 0; // Zeny required for heal [email protected] = 1; // Also buff players? (1: yes / 0: no) [email protected] = 10; // Heal delay, in seconds if (@HD > gettimetick(2)) end; if ([email protected]) { message strcharinfo(0), "Healing costs " + callfunc("F_InsertComma",[email protected]) + " Zeny."; if (Zeny < [email protected]) end; if (select("^0055FFHeal^000000:^777777Cancel^000000") == 2) end; Zeny -= [email protected]; } specialeffect2 EF_HEAL2; percentheal 100,100; if ([email protected]) { specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; } if (getbrokenid(1) >= 1) { repairall; } if(getgroupid() >= 5 ){ set([email protected], 5); // duration in minutes sc_start(SC_CP_HELM, ([email protected] * 1000 * 60), 1); sc_start(SC_CP_ARMOR, ([email protected] * 1000 * 60), 1); sc_start(SC_CP_SHIELD, ([email protected] * 1000 * 60), 1); sc_start(SC_CP_WEAPON, ([email protected] * 1000 * 60), 1); switch ( basejob ) { case Job_Alchemist: set [email protected], 445; break; case Job_Monk: set [email protected], 447; break; case Job_Star_Gladiator: set [email protected], 448; break; case Job_Sage: set [email protected], 449; break; case Job_Crusader: set [email protected], 450; break; case Job_SuperNovice: set [email protected], 451; break; case Job_Knight: set [email protected], 452; break; case Job_Wizard: set [email protected], 453; break; case Job_Priest: set [email protected], 454; break; case Job_Bard: case Job_Dancer: set [email protected], 455; break; case Job_Rogue: set [email protected], 456; break; case Job_Assassin: set [email protected], 457; break; case Job_Blacksmith: set [email protected], 458; break; case Job_Hunter: set [email protected], 460; break; case Job_Soul_Linker: set [email protected], 461; break; default: if ( upper == 1 && baselevel < 70 ) set [email protected], 494; } if ( [email protected] ) { sc_start4 sc_spirit, 360000, 5, [email protected],0,0; skilleffect [email protected], 5; } } if ([email protected]) @HD = gettimetick(2) + [email protected]; end; }  
  11. Hijirikawa's post in Different mes for duplicate from same npc. was marked as the answer   
    If Statements
    if(strcharinfo(3) == "payon"){ do payon stuff } else if(strcharinfo(3) == "prontera"){ do prontera stuff } else if(strcharinfo(3) == "alberta"){ do alberta stuff } IF + Switch Statements
    if(strcharinfo(3) == "payon"){ set [email protected],1; } if(strcharinfo(3) == "prontera"){ set [email protected],2; } if(strcharinfo(3) == "alberta"){ set [email protected],3; } switch([email protected]){ case 1: payon here case 2: prontera here case 3: alberta here } Just do which ever will look cleaner and easier to follow, I'd pick the combo with switch if it was me though
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.