-
Posts
439 -
Joined
-
Last visited
-
Days Won
26
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Posts posted by pajodex
-
-
2 hours ago, klesler said:
Hi rAthena!
I'm trying to compare an input with rid2name(getcharid(3))
E.g
input @PlayerSpecInputName$; set .@ownName$,( rid2name(getcharid(3)) ); if( @PlayerSpecInputName$ == .@ownName$ ) { mes "You cant use your own name"; close;
But the logic is only working if the player input his own name exactly how it is written (case-sensitive),
ex: If a player nick is 'XxXExAmPLE' and he inputs 'xxxexample', my if ( @PlayerSpecInputName$ == .@ownName$ ) wont work properly.Does anybody know how to overcome that ?
Thanks in advance!
Best,
Gabriel.You can do something like
if ( .@PlayerSpecInputName$ == strcharinfo(0) ) { mes "Mehh your using your name"; close; }
PS: I don't know if you intentionally use @PlayerSpecInputName$ which is a temporary variable attach to player? or is this a typo? Anyways, I used .@PlayerSpecInputName$
-
Or do something like this..
Item Y script:
{ if( !getequipid(EQI_ACC_L) == ITEMX || !getequipid(EQI_ACC_R) == ITEMX ) { bonus bAllStats, 1000; bonus bMdef, 100; } },{},{}
assuming Item X and Y are accessories
-
16 minutes ago, Haikenz said:
OnNPCKillEvent: if ( .Option&8 && getgmlevel() >= .gm ) end; // If gm = event wont happen if ( getmonsterinfo( killedrid, MOB_MVPEXP )) { for (.@a = 0; .@a < getarraysize(.t_maps$); ++.@a) { if ( strcharinfo(3) == .t_maps$[.@a]) { if ( !getcharid(1) ) { if (rand(100) < .chance) getitem .s_rwd[0], .s_rwd[1]; if(.Option&16) { #MVP_LADDER_POINTS = #MVP_LADDER_POINTS + .point;
already have this ... to using the latest version of your script
I will give it another test right now.. hold on.. You can send me DM in discord for faster feed back and if it is really a bug, I can send you right away
EDIT:
Done testing... I cannot reproduce your error.. here is the result...
1. I went to prt_fild00 (not in the list) and summoned Baphomet.. after killing :
I did it twice to make sure..
2. Then I went to abbey02 (on the list):
EDIT2:
- Its a matter of not announcing if player kills MVP outside the map.. Issue is being tackled via discord .. Nothing to panic
-
20 minutes ago, Haikenz said:
@pajodex If you summon monsters on other maps that are not set in the mvp area, the points are counted as well.
Example: I invoked Garm from xmas_fild01 on prt_fild00 and gave points.Did you modify the script? I cant seem to produce your report..
for (.@a = 0; .@a < getarraysize(.t_maps$); ++.@a) { if ( strcharinfo(3) == .t_maps$[.@a]) {
that part of the script means if player is on the map listed on .t_maps$ array will give points
-
Hi, I just got this weird error and notice right now.. right after I change job, charserv is throwing this error..
[SQL]: DB error - Table '.\ragnarok\skill' is marked as crashed and should be repaired [Debug]: at h:\dxro\rathena\src\char\char.cpp:420 - DELETE FROM `skill` WHERE `char_id`='150121'
I tested with other characters... still the same..
after I restart my server.. now I'm getting this error..
[SQL]: DB error - Table '.\ragnarok\skill' is marked as crashed and should be repaired [Debug]: at h:\dxro\rathena\src\char\char.cpp:2292 - SELECT 1 FROM `skill` LIMIT 1; [Fatal Error]: char : A tables is missing in sql-server, please fix it, see (sql-files main.sql for structure)
....
I was in the middle of testing my script and this suddenly happens. xD
I'm not really good at this stuff so please forgive me.
Here is what happens when I open my sql database xD
SOLVED:
I dropped the `skill` table and made a new one xD -
On 4/29/2018 at 2:27 AM, danielps said:
So using type UNITTYPE_NPC will work for npcs and also mobs? I'm using the latest rA version, is it working UNITTYPE_NPC for mobs too ?
Mobs are Non-Playing Characters, too. As far as i know.
-
1 hour ago, Haikenz said:
1 - You must disable the merchant discount ability in the store.
2 - In the mail the % is not giving ENTER
1. Merc discount skill only works for zeny based items sold i shops.. It may appear to be discounted but its not( as far as i know)
2. I dont think there's a way to make 'enter' on rodex via npc script... Unless there's an updated rodex mail script available ready which i believe will be available any time soon.
-
@llchrisll is right.. I just made the code right away without thinking xd. As long as you get the main point @nikita54421
-
To add up because I didn't read your post carefully: (not tested)
- script nighttime#pvp -1,{ OnInit: if(isnight()) setBattleFlag "pk_mode",1,true; else if (isday()) setBattleFlag "pk_mode",0,true; end; }
-
1
-
-
1 hour ago, nikita54421 said:
Hello, friends!
Where can I find an open pvp script behind cities at a specific time here?For example, pvp only works at night, at all locations except cities
The search did not help me!
Thank youhttps://github.com/rathena/rathena/blob/master/conf/battle/misc.conf
// PK Server Mode. Turns entire server pvp(excluding towns). Experience loss is doubled if killed by another player. // When players hunt monsters over 20 levels higher, they will receive 15% additional exp., and 25% chance of receiving more items. // There is a nopvp.txt for setting up maps not to have pk on in this mode. Novices cannot be attacked and cannot attack. // Normal pvp counter and rank display are disabled as well. // Note: If pk_mode is set to 2 instead of 1 (yes), players will receive a // manner penalty of 5 each time they kill another player (see manner_system // config to adjust how this will affect players) pk_mode: 0
-
1
-
-
On 4/21/2018 at 3:40 AM, Haikenz said:
Add support to use item rather than points in the store.
1. You can use https://github.com/rathena/rathena/blob/master/npc/custom/quests/quest_shop.txt as alternative as of now.
On 4/21/2018 at 3:40 AM, Haikenz said:problem with ranking
2. Actually, its because Top 1 and Top 2 has same kill counts. fixing that requires an advance level of sql coding and I'm far from that level yet. Maybe someday I will re-update this for cases like ties happens.
.. I will try to do some hot fix on my free time regarding this issue. Just keep updated.
.. I will add item as fee in shop as well.
Updated this to version 3.1.. Just wait for moderator approval.
3.1 - Changelogs
- Fix ranking issues on tie-cases (reported by Heikenz)
- Added item as currency support in ladder shop
- Modified F_CheckMvpLadder function
Special Thanks to @AnnieRuru for helping / mentoring me
For tie cases, ranker will now put them on same rank.. sample: Player kills [Eve] 11 [Robert] 9 [Rex] 11 when ranked : Rank Player kills 1 [Eve] 11 1 [Rex] 11 3 [Robert] 9
Rex is actually at rank 2 but since he is tied with Eve, they will both be ranked 1. So, ranked 2 will be skipped
-
A little update on what's going on with this project. Please check my first post above!
Updated my first post.. Please check it out! Thanks!
-
3 hours ago, Loke said:
Can you add get free 1pc of YGGberry to all online players via rodex everytime the MVP kill by other player in their respective map except in mvp room and deadbranch room.
I can but i dont think its ideal to do that. Sending rewards via roDex in script uses sql. Every time it is executed, it will cause server lag depending on how many people are online. ( i think? Learned from my sempais)
-
2 hours ago, Skyzone said:
Wow This is good for my New Battleground NPC
Useful for my PUBG Intense Event
I will release soon on rathena
Base my Work on PUBG.
is this Release Already? or it is work in progress?
It's currently in progress... I was almost done but I I don't think it is ready for release since it is not optimized and really non-user friendly. I'm doing a overhaul so it would be worth.
-
On 4/16/2018 at 7:15 PM, Haikenz said:
@pajodex It would be much better to add a protection on the maps listed so as not to use
Bloody Branch, so as not to interfere with ranking.
Thank you for your suggestion. Will update this script soon. I just got back from vacation
@Holograma download the latest version.. I've incorporated your request in that version...
@Haikenz As I re-checked my script. I already put no-branch mapflag on all maps listed..
Version 3.0 contains the ff changelogs:
- MVP Ladder points system
- MVP Ladder points shop
- See your rank standings
- Optimized and Re-worked
-
1
-
1
-
On 4/14/2018 at 3:32 PM, Quesooo said:
@pajodex thank you for this
can we make this script something like this after killing the plant the monster ( plant it self ) spawn on the map in 10 sec or 5 sec?
i test it and i like it but after killing all monster i dont see any plant any where on the map and just wait for 2 mins event end
You can double the number of monsters spawned. You can freely use and edit this script as you wish.
-
22 minutes ago, Leic said:
just for clarification, will this be repeatable every set time?
yup depends on your wanting
-
41 minutes ago, Leic said:
requesting for all "dailysupply" in char_reg_num to be deleted on all characters every 00:00 server time
OnClock0000: query_sql("UPDATE `char_reg_num` SET `value` = '0' WHERE `key` ='dailysupply'"); addrid(0); dailysupply = 0; end;
-
On 4/9/2018 at 7:20 PM, Holograma said:
Hey, is there a way to change the reward system
Like i want 3 rewards daily, 6 weekly and 10 monthly
I will try to do something here..
Change the func name:
OnReward: OnClock0000: if(.Option&4 && gettime(DT_DAYOFMONTH) == .day ){ callfunc ( "F_MVPRewardm" , "month_kills" , .MailTitle$[2] , .Prize_m[.@i * 3 + 2] , .Prize_m[.@i * 3] , .Prize_m[.@i * 3 + 1] , "Monthly"); sleep 5000; } if(.Option&2 && gettime(DT_DAYOFWEEK) == .week ){ callfunc ( "F_MVPRewardw" , "week_kills" , .MailTitle$[1] , .Prize_w[.@i * 3 + 2] , .Prize_w[.@i * 3] , .Prize_w[.@i * 3 + 1] , "Weekly"); sleep 5000; } if (.Option&1) { callfunc ( "F_MVPRewardd" , "day_kills" , .MailTitle$[0] , .Prize_d[.@i * 3 + 2] , .Prize_d[.@i * 3] , .Prize_d[.@i * 3 + 1] , "Daily"); } end;
add three new func: (and change the 10 to 3 and 6)
function script F_MVPRewardm { query_sql("SELECT `char_id` FROM `mvp_ranking` WHERE `"+getarg(0)+"` ORDER BY CAST(`"+getarg(0)+"` AS SIGNED) DESC LIMIT 10",.@cid); for(.@i = 0; .@i<getarraysize(.@cid); .@i++) { query_sql("INSERT INTO `mail` (`send_name`,`send_id`,`dest_name`,`dest_id`,`title`,`message`,`time`,`status`,`zeny`,`type`) VALUES ('no-reply','0','"+strcharinfo(0,.@cid[.@i])+"','"+.@cid[.@i]+"','*"+getarg(1)+"*','Parabéns~ % Você foi número #"+(.@i+1)+" no "+getarg(1)+"! Obrigado por particippar! [ Seu premio está anexado neste mail. ] Este mail é automatico e não deve ser respondido. Att Equipe InovaRO.',UNIX_TIMESTAMP(NOW()),1,"+getarg(2)+",0)"); query_sql("SELECT `id` FROM `mail` WHERE `send_name` = 'no-reply' ORDER BY CAST(`id` AS SIGNED) DESC LIMIT 1",.@id); query_sql("INSERT INTO `mail_attachments` (`id`,`nameid`, `amount`, `identify`) VALUES ('"+.@id+"',"+getarg(3)+","+getarg(4)+",'1')"); } announce "[Ajudante MVP]: Parabéns aos "+getarg(5)+" TOP 10 caçadores de MVP! Relogue e cheque seu Correio para conferir os prêmios.",bc_blue|bc_all; query_sql("UPDATE `mvp_ranking` SET `"+getarg(0)+"` = '0'"); return; function script F_MVPRewardw { query_sql("SELECT `char_id` FROM `mvp_ranking` WHERE `"+getarg(0)+"` ORDER BY CAST(`"+getarg(0)+"` AS SIGNED) DESC LIMIT 6",.@cid); for(.@i = 0; .@i<getarraysize(.@cid); .@i++) { query_sql("INSERT INTO `mail` (`send_name`,`send_id`,`dest_name`,`dest_id`,`title`,`message`,`time`,`status`,`zeny`,`type`) VALUES ('no-reply','0','"+strcharinfo(0,.@cid[.@i])+"','"+.@cid[.@i]+"','*"+getarg(1)+"*','Parabéns~ % Você foi número #"+(.@i+1)+" no "+getarg(1)+"! Obrigado por particippar! [ Seu premio está anexado neste mail. ] Este mail é automatico e não deve ser respondido. Att Equipe InovaRO.',UNIX_TIMESTAMP(NOW()),1,"+getarg(2)+",0)"); query_sql("SELECT `id` FROM `mail` WHERE `send_name` = 'no-reply' ORDER BY CAST(`id` AS SIGNED) DESC LIMIT 1",.@id); query_sql("INSERT INTO `mail_attachments` (`id`,`nameid`, `amount`, `identify`) VALUES ('"+.@id+"',"+getarg(3)+","+getarg(4)+",'1')"); } announce "[Ajudante MVP]: Parabéns aos "+getarg(5)+" TOP 6 caçadores de MVP! Relogue e cheque seu Correio para conferir os prêmios.",bc_blue|bc_all; query_sql("UPDATE `mvp_ranking` SET `"+getarg(0)+"` = '0'"); return; function script F_MVPRewardd { query_sql("SELECT `char_id` FROM `mvp_ranking` WHERE `"+getarg(0)+"` ORDER BY CAST(`"+getarg(0)+"` AS SIGNED) DESC LIMIT 3",.@cid); for(.@i = 0; .@i<getarraysize(.@cid); .@i++) { query_sql("INSERT INTO `mail` (`send_name`,`send_id`,`dest_name`,`dest_id`,`title`,`message`,`time`,`status`,`zeny`,`type`) VALUES ('no-reply','0','"+strcharinfo(0,.@cid[.@i])+"','"+.@cid[.@i]+"','*"+getarg(1)+"*','Parabéns~ % Você foi número #"+(.@i+1)+" no "+getarg(1)+"! Obrigado por particippar! [ Seu premio está anexado neste mail. ] Este mail é automatico e não deve ser respondido. Att Equipe InovaRO.',UNIX_TIMESTAMP(NOW()),1,"+getarg(2)+",0)"); query_sql("SELECT `id` FROM `mail` WHERE `send_name` = 'no-reply' ORDER BY CAST(`id` AS SIGNED) DESC LIMIT 1",.@id); query_sql("INSERT INTO `mail_attachments` (`id`,`nameid`, `amount`, `identify`) VALUES ('"+.@id+"',"+getarg(3)+","+getarg(4)+",'1')"); } announce "[Ajudante MVP]: Parabéns aos "+getarg(5)+" TOP 3 caçadores de MVP! Relogue e cheque seu Correio para conferir os prêmios.",bc_blue|bc_all; query_sql("UPDATE `mvp_ranking` SET `"+getarg(0)+"` = '0'"); return;
Will that work fine? thanks love your script
For support, please leave me DM in discord instead.
There will be an optimized version of this soon. For those who have already had a copy of this, just wait for the update.
-
On 4/5/2018 at 7:24 PM, akosivinmark said:
1. What if the highest mmr player does not do pvp anymore? MMR points will be hoarded by the highest ranked player.
2. What if you lose all your mmr to zero, Does it make your mmr negative?
3. Will there be enough players to match on each bracket?
4. What if a player have two or more high ranking mmr characters and feeds all the mmr to his main character?
1. I can always put a ranker npc which can reset all mmr data every month/week as desired.
2. Mmr is set to 1. You can never get any value less than 1. Unless desired.
3. All brackets can be modified. If there is less population in the server. You can set only 3 brackets or less. And the bracket values are also modifiable as desired.
4. It will take tons of effort to do that. There will be calibration matches to check what would be thr starting mmr. Also, there is an anti abuse system in calibration match. Which includes IP check if both players in map are in same IP. No arguments with players playing in shop / cafe. It also includes data record to check the matches in calibration. I can also add that in Solo rank mode.
If you have any more questions or suggestions. Please feel free to let me know for the betterment of this project. ?
-
7 minutes ago, AnnieRuru said:
I read some of your scripts, and I think your script still has some room for improvements
maybe you should learn how to streamline your conditions, so others can also read your script easily
example in this script
poring_w01,100,100,5 script Race-To-99 100,{ if (BaseLevel < 99) { npctalk "Sorry, Only Lvl 99 can claim the reward!"; end; } if ($ItemGive == 100) { npctalk "Sorry, all rewards has been taken!"; end; } if (getreward) { npctalk "Sorry, Nothing for you!"; end; } announce "Congratulations! "+strcharinfo(0)+" has claimed his reward for Race to 99 Event", bc_all; getitem 501, 100; ++$ItemGive; getreward = 1; sleep 2000; announce "There are "+(100 - $ItemGive)+" rewards left to give!", bc_all; end; }
put all the false condition before executing the true condition
Yeah, I guess I have long way to go! Thanks for the tip @AnnieRuru. I will edit my first post.
-
1
-
-
49 minutes ago, Leic said:
some problem with the announce line and if lv98 is taking the reward, it's telling all items has been taken.
Here, forgot to add check if player is lower than lvl 99.
Tick solve and upvote if I helped you, Thanks.
// by pajodex // Optimized by AnnieRuru prontera,150,150,0 script Race-To-99 100,{ if (BaseLevel < 99) { npctalk "Sorry, Only Lvl 99 can claim the reward!"; end; } if ($ItemGive == 100) { npctalk "Sorry, all rewards has been taken!"; end; } if (getreward) { npctalk "Sorry, Nothing for you!"; end; } announce "Congratulations! "+strcharinfo(0)+" has claimed his reward for Race to 99 Event", bc_all; getitem 501, 100; ++$ItemGive; getreward = 1; sleep 2000; announce "There are "+(100 - $ItemGive)+" rewards left to give!", bc_all; end; }
-
2
-
-
1 hour ago, Leic said:
sorry my bad. it should be globe reg value i think.
Once they reach 99. the script checks on how many $maxlevel already took the reward. something like that. if less or equal to 100 value = give reward. Else just a message that he's not eligable to get the rewards.
something like onlevelup?
exactly what I did. Test it.
-
1 hour ago, Leic said:
can someone direct me to a script that does the following
1. if a character reaches 99 it will give a reward
2. total of 100 rewards only on 1st 99 characters
3. if a character leveled to 99 but the count is 101 99 characters, the script will not give reward
// by pajodex prontera,150,150,0 script Race-To-99 100,{ .@item = 501; // Item ID .@amount = 100; // Amount if($ItemGive != 100 && BaseLevel == 99) { if(getreward != 1) { Announce "Congratulations! "+strcharinfo{0}+" has claimed his reward for Race to 99 Event", 0; getitem .@item, .@amount; $ItemGive++; getreward++; sleep 2000; announce "There are "+100 - $ItemGive+" rewards left to give!"; end; } else npctalk "Sorry, Nothing for you!"; end; } else { npctalk "Sorry, all rewards has been taken!"; end; } }
Not yet tested, but it should work.
-
1
-
How to deal with case sensitive ?
in Scripting Support
Posted · Edited by pajodex
You can use checkidle(); instead.. see how this is scripted..
Just read https://github.com/rathena/rathena/blob/master/doc/script_commands.txt
You can see all alternative codes that you might need.. or ask here in forum..
As for variables... read these examples..
Examples: name - permanent character integer variable name$ - permanent character string variable @name - temporary character integer variable @name$ - temporary character string variable $name - permanent global integer variable $name$ - permanent global string variable $@name - temporary global integer variable $@name$ - temporary global string variable .name - NPC integer variable .name$ - NPC string variable .@name - scope integer variable .@name$ - scope string variable 'name - instance integer variable 'name$ - instance string variable #name - permanent local account integer variable #name$ - permanent local account string variable ##name - permanent global account integer variable ##name$ - permanent global account string variable