-
Posts
1702 -
Joined
-
Last visited
-
Days Won
18
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Patskie
-
-
Try below
prontera,150,150,6 script Gold Room Warper 100,{ warp "ordeal_3-1", 149, 149; end; OnPCDieEvent: if (strcharinfo(3) != "ordeal_3-1" || !countitem(.item) || killerrid == getcharid(3)) end; getmapxy .@map$, .@x, .@y; .@i = countitem(.item) / 10; if (!.@i) end; delitem .item, .@i; makeitem .item, .@i, .@map$, .@x, .@y; end; OnInit: .item = 969; // Gold end; } ordeal_3-1,0,0 monster Dokebi 1110,50,5000
-
You can only use integer values when creating scripts so you have to adjust your rand() to achieve 0.5% chance
if (rand(1000) < 5) means 0.5% if (rand(1000) < 1) means 0.1% if (rand(1000) < 10) means 1%
- 1
-
If you have a trigger point then it should work fine. (i.e OnPCLoginEvent, OnPCLogoutEvent, bindatcmd, etc.)
-
What are you updating in the database? If you are updating by providing DML (insert,update,delete) statements then there's no need to restart rAthena
-
prontera,150,150,6 script Test 100,{ for (.@i = 50; .@i <= 60; .@i++) { playBGM "" + .@i; sleep2 3000; } end; }
-
Change
if (getequiprefinerycnt(.@part) >= 7) announce "[Hollgrehenn]: "+strcharinfo(0)+" has successfully refined "+getequipname(.@part)+" to +"+getequiprefinerycnt(.@part)+"!",0;
To
switch (getiteminfo(getequipid(.@part), 13)) { case 1: .@asd = 9; break; case 2: .@asd = 8; break; case 3: .@asd = 6; break; case 4: .@asd = 5; break; default: break; } if (getequiprefinerycnt(.@part) >= .@asd) announce "[Hollgrehenn]: "+strcharinfo(0)+" has successfully refined "+getequipname(.@part)+" to +"+getequiprefinerycnt(.@part)+"!",0;
-
9 hours ago, Mabuhay said:
- script asdahjhla -1,{ OnPCKillEvent: if ( inarray(.map$, strcharinfo(3)) != -1 ) { if ( rand(100) <= .chance ) { getitem 501, 10; #CASHPOINTS += 1; // I forgot to add this dispbottom "You earned 1 Cash Point. Total : "+ #CASHPOINTS; } } end; OnInit: .chance = 50; // chance to get something setarray .map$, "prontera", "payon"; // map list }
This can be exploited if you do a suicide mission (paladin casting grand cross for instance)
Change
if ( rand(100) <= .chance ) {
to
if ( rand(100) <= .chance && killedrid != getcharid(3) ) {
- 1
-
*guildgetexp <amount>; This will give the specified amount of guild experience points to the guild the invoking character belongs to. It will silently fail if they do not belong to any guild.
- 1
-
You can give an event npc of yours so we can give some sort of pseudo code on how to achieve your request.
-
Can elaborate more what you want with these commands so people can help you
-
-
Change
set .i1rand,rand(getarraysize(.i1));
to
set .i1rand,getarraysize(.i1);
Change
// Common Items else { getitem .i1[.i1rand],1; end; }
to
// Common Items else { while (.@i < .i1rand) { getitem .i1[.@i],1; .@i++; } end; }
-
OnPCDieEvent: if (@die % 2) end; warp "SavePoint", 0, 0; @die++; end;
-
-
Would that 5 hours mean accumulative regardless if they go offline or not?
- 1
-
Change
Job_Options(.@job_opt,Job_Swordman, Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief, Job_Super_Novice, Job_Taekwon, Job_Gunslinger, Job_Ninja);
To
Job_Options(.@job_opt,Job_Swordman, Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief);
- 1
-
12 hours ago, gidzdlcrz said:
Can you share the diff file for this bro?
You can check my comment here
- 1
-
It should not harm you at the moment. So it can be ignored "for now". But if you want to really get rid of the warnings then you need to change all INT(11) to INT
-
-
Your script will already check if the invoking player is in party or not
if (getcharid(1) == 0){ mes "^ff0000To enter, you must create or join a party of 1 or more members.^000000"; close; }
*getcharid(<type>{,"<character name>"}) This function will return a unique ID number of the invoking character, or, if a character name is specified, of that player. Type is the kind of associated ID number required: 0 - Character ID 1 - Party ID 2 - Guild ID 3 - Account ID 4 - Battle Ground ID 5 - Clan ID
-
You could try below
prontera,150,150,6 script Gold Room Manager 2_M_OLDBLSMITH,{ function CheckRoom; .@guild = getcharid(2); if (!.@guild) { mes .npc$; mes "You are not in guild"; close; } if (strcharinfo(0) != getguildmaster(.@guild)) { mes .npc$; mes "Only guild leader can talk to me"; close; } if (Zeny < .zeny) { mes .npc$; mes "You need " + (callfunc ("F_InsertComma", .zeny)) + " zeny in order to rent a room."; close; } mes .npc$; mes "Which map do you want to rent?"; next; while (.@i < .size) { if (CheckRoom(.@i) && getd(".Room"+.@i) == getcharid(2)) .@owned++; .@menu$ += .Maps$[.@i] + " - [" + (CheckRoom(.@i) ? "Unavailable" : "Available") + "]:"; .@i++; } .@s = select(.@menu$) - 1; if (CheckRoom(.@s)) { mes .npc$; mes "I told you it's unavailable!"; close; } if (.@owned) { mes .npc$; mes "You already owned a room! Make room for others!"; close; } mes .npc$; mes "Are you sure you want to rent " + .Maps$[.@s] + "?"; next; if (select("Yes:No") - 1) end; Zeny -= .zeny; setd ".Room"+.@s, .@guild; announce "Guild " + getguildname(.@guild) + " has occupied gold room " + .Maps$[.@s], 0; close; // true = occupied | false = available function CheckRoom { .@rn = getarg(0, 0); return getd(".Room"+.@rn) ? true : false; } // Release rooms every 2 hours OnMinute00: if (gettime(DT_HOUR) % 2) end; while (.@i < .size) { setd ".Room"+.@i, 0; .@i++; } announce "Gold rooms are now available again for rent!", 0; end; OnGuildRoom: if (!getcharid(2)) end; while (.@i < .size) { if (getd(".Room"+.@i) == getcharid(2)) { warp .Maps$[.@i], 0, 0; break; } .@i++; } end; OnInit: .npc$ = "[" + strnpcinfo(1) + "]"; setarray .Maps$[0], "ordeal_3-1", "ordeal_3-2"; .size = getarraysize(.Maps$); while (.@i < .size) { setmapflag .Maps$[.@i], MF_NOWARPTO; .@i++; } .zeny = 5000; bindatcmd "guildroom", strnpcinfo(1) + "::OnGuildRoom"; end; } - script GRBuff FAKE_NPC,{ if (@delay > gettimetick(2)) { emotion ET_ANGER; npctalk "Use me after " + (@delay - gettimetick(2)) + " second(s)."; } else { specialeffect2 EF_HEAL2; percentheal 100,100; specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; @delay = gettimetick(2) + 3; // 3 seconds delay } end; } // Add more npc on every room ordeal_3-1,149,149,6 duplicate(GRBuff) Kiddo#ord31 4W_KID ordeal_3-2,153,153,6 duplicate(GRBuff) Kiddo#ord32 4W_KID // Monsters ordeal_3-1,0,0 monster Dokebi 1110,50,5000 ordeal_3-2,0,0 monster Dokebi 1110,50,5000
- 1
-
12218,Assumptio_5_Scroll,LV5 Assumptio Scroll,2,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_ASSUMPTIO,100000,5; skilleffect "HP_ASSUMPTIO",0; },{},{}
Like this?
-
-
Annieruru bg_emp reward for loosing team request
in Scripting Support
Posted