Jump to content

Patskie

Members
  • Posts

    1702
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Patskie

  1. prontera,150,150,0 script Sample 100,{ if ( getgmlevel( ) < 99 ) end; .@npc$ = "[ ^FF0000" + strnpcinfo( 1 ) + "^000000 ]"; .@origin = getcharid( 3 ); mes .@npc$; mes "Enter the player name you want to give a reward point(s)."; next; input .@name$; if ( !getcharid( 3, .@name$ ) ) { mes .@npc$; mes "The player is not online."; close; } mes .@npc$; mes "How many points do you want to give to " +.@name$+ "?"; next; input .@amount; if ( !.@amount ) { mes .@npc$; mes "Invalid amount."; close; } if ( attachrid( getcharid( 3, .@name$ ) ) ) { set eventpoints, eventpoints + .@amount; dispbottom "You have given " + .@amount + " event point" + ( .@amount > 1 ? "s" : "" ) + " by " + rid2name( .@origin ) + "."; dispbottom "You now have " + eventpoints + " event point" + ( eventpoints > 1 ? "s" : "" ) + "."; } attachrid( .@origin ); mes .@npc$; mes "Done!"; close; }
  2. Can you elaborate more on your request? Because on my view i can't seem to understand you =\
  3. - announce strcharinfo(0)+" joined the server!",0; + announce strcharinfo(0)+" joined the server!",bc_self;
  4. - script Broadcaster -1,{ OnInit: bindatcmd "broad",strnpcinfo( 3 )+"::OnBroadCastMessage"; end; OnBroadCastMessage: if ( timer > gettimetick( 2 ) ) { dispbottom "You can use the broadcast command after " + ( timer - gettimetick( 2 ) ) + " second" + ( ( timer - gettimetick( 2 ) ) > 1 ? "s" : "" ) + "."; end; } if ( Zeny < 1000000 ) { dispbottom "You don't have zeny to do broadcasting"; end; } if ( .@atcmd_parameters$[ 0 ] != "" ) { Zeny -= 1000000; announce "[" + strcharinfo( 0 ) + "] : " +implode(.@atcmd_parameters$, " "), 0, 0xFF0000; timer = gettimetick( 2 ) + 10; } end; }
  5. Vote? You mean vote for points?
  6. Linux : make clean && make sql Windows : Use C++
  7. Patskie

    NPC Script

    You should at least let us know what is your server woe time?
  8. If you are using IPB, I prefer to synchronize you forum to your server database so that whenever they create an account on your server they can also use it on your forums.
  9. - script Sample -1,{ OnWhisperGlobal: if ( getgmlevel() < 99 ) end; if ( @whispervar0$ == "start" ) donpcevent strnpcinfo( 1 )+"::OnStart"; end; OnMinute00: if ( gettime( 3 ) % 4 ) end; donpcevent strnpcinfo( 1 )+"::OnStart"; end; OnStart: monster "prontera",150,150,"--ja--",1002,1,strnpcinfo( 1 )+"::OnKilledMonster"; end; OnKilledMonster: //announce strcharinfo( 0 )+ " won the event",0; getitem 501, 1; end; } whisper start
  10. 1. Change 150 150 to the center prontera coordinates 2. Change 1002 to your desired custom mob 3. Change 501 and 1 to your desired item reward and amount - script Sample -1,{ OnMinute00: if ( gettime( 3 ) % 4 ) end; monster "prontera",150,150,"--ja--",1002,1,strnpcinfo( 1 )+"::OnKilledMonster"; end; OnKilledMonster: //announce strcharinfo( 0 )+ " won the event",0; getitem 501, 1; end; }
  11. input .@name$; DELETE FROM `char` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'";
  12. OnNPCKillEvent: if ( strcharinfo( 3 ) != "prt_fild01" || rand( 100 ) > 5 ) end; getitem 909, 1; end;
  13. - script Sample -1,{ OnInit: setarray .Items[0],1201, 1202, 5035; .size = getarraysize( .Items ); end; OnPCLogoutEvent: for ( .@i = 1; .@i < 22; .@i++ ) { for ( .@x = 0; .@x < .size; .@x++ ) { if ( getequipid( .@i ) == .Items[ .@x ] ) unequip( .@i ); } } end; }
  14. I am not lazy for i am only busy

  15. *getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; *getitem2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; This command will give an amount of specified items to the invoking character. If an optional account ID is specified, and the target character is currently online, items will be created in their inventory instead. If they are not online, nothing will happen. It works essentially the same as 'getitem' (it even works for negative ID numbers the same way) but is a lot more flexible. Those parameters that are different from 'getitem' are: identify - Whether you want the item to be identified (1) or not (0). refine - For how many pluses will it be refined. It will not let you refine an item higher than the max refine. attribute - Whether the item is broken (1) or not (0). card1,2,3,4 - If you want a card compound to it, place the card ID number into the specific card slot. Card1-card4 values are also used to store name information for named items, as well as the elemental property of weapons and armor. You can create a named item in this manner, however, if you just need a named piece of standard equipment, it is much easier to the 'getnameditem' function instead. You will need to keep these values if you want to destroy and then perfectly recreate a named item, for this see 'getinventorylist'. If you still want to try creating a named item with this command because 'getnameditem' won't do it for you cause it's too limited, you can do it like this. Careful, minor magic ahead. // First, let's get an ID of a character who's name will be on the item. // Only an existing character's name may be there. // Let's assume our character is 'Adam' and find his ID. @charid = getcharid(0,"Adam"); // Now we split the character ID number into two portions with a binary // shift operation. If you don't understand what this does, just copy it. @card3 = @charid & 65535; @card4 = @charid >> 16; // If you're inscribing non-equipment, @card1 must be 254. // Arrows are also not equipment. @card1 = 254; // For named equipment, card2 means the Star Crumbs and elemental // crystals used to make this equipment. For everything else, it's 0. @card2 = 0; // Now, let's give the character who invoked the script some // Adam's Apples: getitem2 512,1,1,0,0,@card1,@card2,@card3,@card4; This wasn't tested with all possible items, so I can't give any promises, experiment first before relying on it. To create equipment, continue this example it like this: // We've already have card3 and card4 loaded with correct // values so we'll just set up card1 and card2 with data // for an Ice Stiletto. // If you're inscribing equipment, @card1 must be 255. @card1 = 255; // That's the number of star crumbs in a weapon. @sc = 2; // That's the number of elemental property of the weapon. @ele = 1; // And that's the wacky formula that makes them into // a single number. @card2 = @ele+((@sc*5)<<8); // That will make us an Adam's +2 VVS Ice Stiletto: getitem2 1216,1,1,2,0,@card1,@card2,@card3,@card4; Experiment with the number of star crumbs - I'm not certain just how much will work most and what it depends on. The valid element numbers are: 1 - Ice, 2 - Earth 3 - Fire 4 - Wind. You can, apparently, even create duplicates of the same pet egg with this command, creating a pet which is the same, but simultaneously exists in two eggs, and may hatch from either, although, I'm not sure what kind of a mess will this really cause.
  16. prontera,150,150,0 script Sample 100,{ if ( select( "Stat Reset:Skill Reset" ) - 1 ) { if ( !countitem( 512 ) ) end; delitem 512, 1; resetskill; } else { if ( !countitem( 909 ) ) end; delitem 909, 1; resetstatus; } end; }
  17. Didn't test - script Controller -1,{ OnAgitEnd: .gid = getcastledata( "prtg_cas01", 1 ); if ( !.gid ) end; warpguild "prontera", 150, 150, .gid; enablenpc "Rewarder"; end; } prontera,150,150,0 script Rewarder 100,{ .winner = getvariableofnpc( .gid, "Controller" ); if ( !getcharid( 2 ) || getguildmaster( .winner ) != strcharinfo( 0 ) ) end; mes "[Rewarder]"; mes "Claim the reward?"; next; if ( select( "Yes:No" ) - 1 ) end; addrid( 3, 0, .winner ); getitem 501, 1; disablenpc strnpcinfo( 1 ); end; OnInit: disablenpc strnpcinfo( 1 ); end; }
  18. Patskie

    Please maintain english in script section otherwise i will hide this topic. It is included in our board rules
  19. Execute this on your database : ALTER TABLE `picklog` ADD COLUMN `unique_id` bigint(20) unsigned NOT NULL default '0';
  20. You are doing it wrong. It should be : #item "<player name>" item_id/name amount
  21. Edited : //=========== PORING CATCHER MADE ==============\\ //=== BY: SHOGS-GFX and RAGNAROK DEVELOPERS ====\\ //= Please Report if you encounter some errors =\\ //===== https://www.facebook.com/ShogsGfx ======\\ //==============================================\\ //==FUNCTIONS===================================\\ /* GM Can start the event manualy GM Can also stop the event manualy HOW: just PM this npc (npc:pcatch) The Next Guide Will Be Given by the Manager */ //======= PLEASE DO NOT REMOVE CREDITS =========\\ //==============================================\\ //== MORE UPDATES TO COME FOR BETTER FUNCTION ==\\ //===== https://www.facebook.com/ShogsGfx ======\\ //==============================================\\ //====LEVEL OF GM CAN CONTROL THE EVENT=========\\ - script GMCONTROL -1,{ OnInit: set $gmcontrol,60; end; } //---------------END OF SETUP-------------------\\ //================ON WHISPER=========================\\ - script pcatch -1,{ //====LEVEL OF GM CAN CONTROL THE EVENT=========\\ //OnInit: //set $gmcontrol,60; //end; //---------------END OF SETUP-------------------\\ OnWhisperGlobal: if(getgmlevel() >= $gmcontrol) { mes "^3399FF[Poring Catcher]^000000"; mes "Hello GameMaster!"; mes "What do you want to do?"; switch(select("Start Event:Stop Event:Nothing")) { case 1: { next; mes "^3399FF[Poring Catcher]^000000"; mes "Please confirm by typing START."; input .@confirm$; if (.@confirm$ == "START") { donpcevent "Announcer2::OnGMStart"; close; } mes "Confirmation failed"; close; break; } case 2: { next; mes "^3399FF[Poring Catcher]^000000"; mes "Please confirm by typing STOP."; input .@confirm$; if (.@confirm$ == "STOP") { donpcevent "Announcer2::OnGMStop"; close; } mes "Confirmation failed"; close; break; } case 3: { next; mes "^3399FF[Poring Catcher]^000000"; mes "Good bye"; close; } } } } //====================ANNOUNCER======================\\ - script Announcer2 -1,{ OnMinute00: if ( gettime(3) % 2 ) end; donpcevent strnpcinfo(1)+"::OnGMStart"; end; OnGMStart: killmonster "poring_w01.gat","All"; announce "(Poring Manager) : A Gamemaster started a Poring Catcher Event now.",0; sleep 3000; announce "(Poring Manager) : If you want to join, come at the middle of Prontera, enter the warp portal.",0; enablenpc "PoringCatcher"; sleep 2000; announce "(Poring Manager) : Prize: will be Poring Coins",0; sleep 2000; announce "(Poring Manager) : The portal is going to close in one minute.",0; sleep 60000; announce "(Poring Manager) : The portal has been closed.",0; disablenpc "PoringCatcher"; if(getmapusers("poring_w01") == 0) { disablenpc "Poring Banker"; announce "Event Poring Catcher didn't start because there's no players.",0; end; } donpcevent "Poring Banker::OnEnable"; end; OnGMStop: killmonster "poring_w01.gat","All"; announce "A Gamemaster has stopped the Poring Catcher Event",0; mapwarp "poring_w01.gat","prontera.gat",155,173; disablenpc "Poring Banker"; disablenpc "PoringCatcher"; end; OnClock1200: OnClock1100: OnClock1300: OnClock2300: killmonster "poring_w01.gat","All"; announce "(Poring Manager) : Poring Catcher Event will start at the moment.",0; sleep 3000; announce "(Poring Manager) : If you want to join, come at the middle of Prontera, enter the warp portal.",0; enablenpc "PoringCatcher"; sleep 2000; announce "(Poring Manager) : Prize: will be Poring Coins",0; sleep 2000; announce "(Poring Manager) : The portal is going to close in one minute.",0; sleep 60000; announce "(Poring Manager) : The portal has been closed.",0; disablenpc "PoringCatcher"; if(getmapusers("poring_w01") == 0) { disablenpc "Poring Banker"; announce "Event Poring Catcher didn't start because no players found in map.",0; end; } donpcevent "Poring Banker::OnEnable"; end; OnInit: disablenpc "Poring Banker"; disablenpc "PoringCatcher"; } //---------All Job Registration---------------------------------------- prontera,155,158,0 warp PoringCatcher 2,2,poring_w01,105,128 //--------------------------------------------------------------------- //--------------------------------------------------------------------- - script Poring Banker -1,{ OnEnable: mapannounce "poring_w01","Poring Manager: The Poring Catcher Event will start shortly",0; sleep2 10000; mapannounce "poring_w01","Poring Manager: I will be summoning 100 porings with different names kill the real poring",0; sleep2 10000; mapannounce "poring_w01","Poring Manager: What are we waiting for?..Let's Catch some Porings!!...",0; sleep2 10000; goto L_Start; end; L_Start: if(getmapusers("poring_w01") == 0) goto L_None; if(getmapusers("poring_w01") >= 1) { mapannounce "poring_w01","Poring Manager: Get ready at the count of 5 we will start!....",0; sleep2 6000; mapannounce "poring_w01","Poring Manager: 5",0; sleep2 5000; mapannounce "poring_w01","Poring Manager: 4",0; sleep2 4000; mapannounce "poring_w01","Poring Manager: 3",0; sleep2 3000; mapannounce "poring_w01","Poring Manager: 2",0; sleep2 2000; mapannounce "poring_w01","Poring Manager: 1",0; donpcevent "Poringsummoner::OnSummon"; end; } L_None: disablenpc "Poring Banker"; killmonster "poring_w01.gat","All"; end; } //==================SUMMONER OF PORINGS ======================\\ - script Poringsummoner -1,{ OnSummon: if(getmapusers("poring_w01") == 0) goto L_2None; monster "poring_w01.gat",0,0,"Poring",1002,1,"poringwin::OnMobKilled"; monster "poring_w01.gat",0,0,"Pouring",1002,10,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"Proing",1002,10,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"Poirng",1002,10,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"Poing",1002,10,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"I'm not a Poring",1002,5,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"Gnirop",1002,1,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"Poring",1113,1,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"Poring",1062,1,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"Por|ng",1002,10,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"Por1ng",1002,10,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"Porong",1002,10,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"P0ring",1002,10,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"P@ring",1002,10,"poringlose::OnMobKilled"; monster "poring_w01.gat",0,0,"Porng",1002,1,"poringlose::OnMobKilled";end; L_2None: disablenpc "Poring Banker"; killmonster "poring_w01.gat","All"; end; } //==================REAL PORING FOR WIN======================\\ - script poringwin -1,{ OnMobKilled: killmonster "poring_w01.gat","All"; atcommand "@doommap"; getitem 7539,5; announce "Poring Banker: We have a winner! well done " + strcharinfo(0) + ".",0; warp "SavePoint",0,0; end; } //==================DUMY PORINGS FOR LOSERS======================\\ - script poringlose -1,{ OnMobKilled: dispbottom "Your out of the game, You did not catch the right Poring !"; percentheal -99,-99; warp "SavePoint",0,0; end; } //==================Mapflags========================\\ poring_w01 mapflag nowarp poring_w01 mapflag nowarpto poring_w01 mapflag noteleport poring_w01 mapflag nosave poring_w01 mapflag nomemo poring_w01 mapflag nobranch poring_w01 mapflag noloot poring_w01 mapflag noskill poring_w01 mapflag nopenalty
  22. - script Sample -1,{ OnPCLoadMapEvent: getmapxy(.@map$,.@x,.@y,0); if ( .@map$ == .map$ && getcastledata( .castle$, 1 ) == getcharid( 2 ) ) end; warp "SavePoint",0,0; end; OnInit: .map$ = "prontera"; .castle$ = "prtg_cas01"; setmapflag .map$, mf_loadevent; end; }
  23. Replace : - script Announcer2 -1,{ by : - script Announcer2 -1,{ OnMinute00: if ( gettime(3) % 2 ) end; donpcevent strnpcinfo(1)+"::OnGMStart"; end;
×
×
  • Create New...