-
Posts
68 -
Joined
-
Last visited
buraquera's Achievements
-
Make this script have more winners before closing.
buraquera replied to Noire's question in Scripting Support
add something like this after the last dialog if (.5times >=5){ clear; mes "Sorry someone already has won"; close; } -
Make this script have more winners before closing.
buraquera replied to Noire's question in Scripting Support
sorry, there is no need for "set", use: .5times++; if (.5times >=5) disablenpc(); and line 144, not 143. After "set winRPS" xD -
Make this script have more winners before closing.
buraquera replied to Noire's question in Scripting Support
add this to line 143 set .5times++; if (.5times >=5) disablenpc(); -
Transfering Party Leader on Death / Sharing Zeny with Party Members
buraquera replied to Eross's question in Scripting Support
try this - script mh_ghall -1,{ OnPCDieEvent: // if !(INSTANCE X IS RUNNING) #todo // end; @die_count++; if (@die_count >= 3) { // Clean player .@party_id = getcharid(1); party_delmember(getcharid(0)) warp "prontera",50,50; @die_count = 0; // Check if party leader if (!is_party_leader(.@party_id)) end; // Set party var getpartymember .@party_id, 1; copyarray .@ptmembercid,$@partymembercid,$@partymembercount; // Remove offline members for (.@i = 0 ; .@i < $@partymembercount; .@i++){ if (!isloggedin(.@ptmembercid[.@i])) deletearray .@partymembercid[.@i],1; } party_changeleader(.@party_id,convertpcinfo(.@partymembercid[rand(getarraysize(.@partymembercid))],CPC_CHAR)); end; } end; } OnPCLogoutEvent: instance_destroy(instance_id(IM_PARTY)); set @instance_name$, ""; instance_active = 0; } prontera,50,50,0 script InstanceCreate -1,{ .price = 10000; getpartymember getcharid(0),1; .@individual_price = .price/$@partymembercount; for (.@i = 0 ; .@i < $@partymembercount; .@i++){ if (readparam(Zeny,convertpcinfo($@partymembercid[.@i],CPC_CHAR)) > .@individual_price) .@c++; } if (.@c == $@partymembercount) // Start Event here } -
prontera,150,150,4 script NpcJobChange 82,{ mes "Hi, wich class? " job[0] = select("Swordman:Magician:Archer:Acolyte:Merchant:Thief:Super Novice"); if (job[0] == 7) job[0] = 23; // Suno close; OnPCBaseLvUpEvent: if (!Class && job[0] == 23 && BaseLevel >= 45) // If Suno jobchange job[0]; end; OnPCJobLvUpEvent: if (job[0] == 23) end; // suno doesnt apply if (!Class && JobLevel >= 10) jobchange job[0]; end; } Test this prototype and u can improve it for more classes
-
Strict 1 IP per person inside goldroom
buraquera replied to agamanaros's question in Script Requests
skycity,117,217,6 script Piso Dungeon 540,{ mes "[Piso Dungeon]"; mes "Do you want to enter my Piso Dungeon?"; menu "Ok",-,"No thanks.",L_No; ////////////////////////////// IP CHECK .@ip$ = getcharip(); getmapunits(BL_PC,"ba_lib",.@name$); for(.@i=0; .@i < getarraysize(.@name$); .@i++){ if(getcharip(.@name$[.@i]) == .@ip$){ mes "[Piso Dungeon]","Double IP detected"; close; } } ///////////////////////////// IP CHECK mes "Awesome!"; next; mes "I wish you all the luck! Happy Hunting!"; atcommand "@alootid reset"; atcommand "@alootid +35405"; atcommand "@autostore 15"; warp "ba_lib",0,0; close; L_No: close; OnInit: waitingroom " Piso Dungeon",0; end; } Add the lines between "////////////////// CHECK IP" -
Try this...: prontera,155,181,5 script Gift NPC 4_M_2NDPRIN2,{ set .Hour,24; if (inarray($richestplayer,getcharid(1)) == -1) end; if( #dailytimer < gettimetick(2) ) { mes "You have Gained a Daily Gift."; #dailytimer = gettimetick(2) + ( .Hour * 3600 ); getitem 6101,1; //set the price here } else{ .@last = #dailytimer - gettimetick(2); .@hour = .@last % ( 24 * 3600 ) / 3600; .@min = .@last % ( 24 * 3600 ) % 3600 / 60; .@sec = .@last % ( 24 * 3600 ) % 3600 % 60; mes "You have to wait to get your next Daily Gift."; mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000"; } close; OnInit: initnpctimer; end; OnHour00: // Refresh Richest tables every day // note this can get 1 or more if they have same amount of zeny deletearray $richestplayer; query_sql("SELECT `char_id` FROM `char` WHERE `zeny` = (SELECT MAX(`zeny`) FROM `char`",$richestplayer); end; } Notes that i didnt do anything about PVP coz it depends on your pvp ladder system. The zeny winner can only be acessible via SQL. Its not a good ideia to query sql many times so i made a "daily richest" instead. Note also that it can be 1 or more richest as they can have the same zeny amount
-
Help! Script for broadcast WoE countdown for 1 Hour WoE
buraquera replied to luisangelops's question in Script Requests
The script seems to be ok. It should work if u change .timer 60. U said its not working, whats happening? -
Release: Battleground Extended 2020 ! With Bomberman/Poring Ball
buraquera replied to grenat50's topic in Source Releases
Thanks for update, It diff and compile perfectly But when i first try play "double inferno" this error showsup -
Release: Battleground Extended 2020 ! With Bomberman/Poring Ball
buraquera replied to grenat50's topic in Source Releases
-
creating a simple character info display npc
buraquera replied to f_fman's question in Scripting Support
I recommend u check doc/script_commands.txt and read it full Anyway, u wont need to query. See: Some variables are special, that is, they are already defined for you by the scripting engine. You can see the full list in 'src/map/script_constants.hpp', which is a file you should read, since it also allows you to replace lots of numbered arguments for many commands with easier to read text. The special variables most commonly used are all permanent character-based variables: Zeny - Amount of Zeny. Hp - Current amount of hit points. MaxHp - Maximum amount of hit points. Sp - Current spell points. MaxSp - Maximum amount of spell points. StatusPoint - Amount of status points remaining. SkillPoint - Amount of skill points remaining. BaseLevel - Character's base level. JobLevel - Character's job level. BaseExp - Amount of base experience points. JobExp - Amount of job experience points. NextBaseExp - Amount of base experience points needed to reach the next level. NextJobExp - Amount of job experience points needed to reach the next level. Weight - Amount of weight the character currently carries. MaxWeight - Maximum weight the character can carry. Sex - 0 if female, 1 if male. Class - Character's job. Upper - 0 if the character is a normal class, 1 if advanced, 2 if baby. BaseClass - The character's 1-1 'normal' job, regardless of Upper value. For example, this will return Job_Acolyte for Acolyte, Priest/Monk, High Priest/Champion, and Arch Bishop/Sura. If the character has not reached a 1-1 class, it will return Job_Novice. BaseJob - The character's 'normal' job, regardless of Upper value. For example, this will return Job_Acolyte for Acolyte, Baby Acolyte, and High Acolyte. Karma - The character's karma. Karma system is not fully functional, but this doesn't mean this doesn't work at all. Not tested. Manner - The character's manner rating. Becomes negative if the player utters words forbidden through the use of 'manner.txt' client-side file. -
There same ways of doing this. try this - script asdahjhla -1,{ OnPCKillEvent: if (countinarray(.map$,strcharinfo(3)) && $pkscore[getcharid(0)] < 21 && rand(100) <= .chance && killedrid != getcharid(3)){ getitem 7960, 1; $pkscore[getcharid(0)]++; } end; OnInit: .chance = 100; // chance to get something setarray .map$, "pvp_y_1-2"; // map list end; OnHour00: deletearray($pkscore); end; }
-
R> If i spend cash points i will get another item
buraquera replied to lelouchxv's question in Script Requests
Not sure if you can check if player has finish shopping via script. If no, and also if in your game the cashpoints are non-transferable u can try having a new acc variable as #CASHPOINTS_CALC So whenever u give a player cashpoints u add on both variables. Later u can have a script wich compares both variables and return the result. Could be called on a npc "Cash Expent Reward" or on an event as "OnPcLoginEvent" etc... -
Add this on line ~40, before // Randomize each Option Slot: if (!countitem(6608)){ mes "Você não possui nenhuum " + getitemname(6608) + "."; close; } delitem(6608,1);
-
Specify what you want to limit ...?It may be a delay, or if the dead player is the same as last time ......