-
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
-
-
Hi,
How do I add character id to an array.
Sample:
Array = .@char_id If Player A click NPC A. then Plaayer B clicks NPC A. Player A <CHAR_ID> will attach to .@char_id[0] Player B <CHAR_ID> will attach to same .@char_id[0]
Thanks
-
Hi,
I'm making a custom script command. I want to make a version of bg_monster but instead of bg change to party, So far here is what I was aable to make. No errors but monster do not detect party members as friendly unit:
BUILDIN_FUNC(pt_monster) { int class_ = 0, x = 0, y = 0, party_id = 0; const char *str, *mapname, *evt = ""; party_id = script_getnum(st, 2); mapname = script_getstr(st, 3); x = script_getnum(st, 4); y = script_getnum(st, 5); str = script_getstr(st, 6); class_ = script_getnum(st, 7); if (script_hasdata(st, 8)) evt = script_getstr(st, 8); check_event(st, evt); script_pushint(st, mob_spawn_party(mapname, x, y, str, class_, evt, party_id)); return SCRIPT_CMD_SUCCESS; }
/*========================================== * Party Monster *------------------------------------------*/ int mob_spawn_party(const char* mapname, int16 x, int16 y, const char* mobname, int mob_id, const char* event, unsigned int party_id) { struct mob_data *md = NULL; struct spawn_data data; int16 m; if ((m = map_mapname2mapid(mapname)) < 0) { ShowWarning("mob_spawn_party: Map [%s] not found.\n", mapname); return 0; } memset(&data, 0, sizeof(struct spawn_data)); data.m = m; data.num = 1; if (mob_id <= 0) { mob_id = mob_get_random_id(-mob_id - 1, 1, 99); if (!mob_id) return 0; } data.id = mob_id; if ((x <= 0 || y <= 0) && !map_search_freecell(NULL, m, &x, &y, -1, -1, 1)) { ShowWarning("mob_spawn_paarty: Couldn't locate a spawn cell for guardian class %d (bg_id %d) at map %s\n", mob_id, party_id, map[m].name); return 0; } data.x = x; data.y = y; safestrncpy(data.name, mobname, sizeof(data.name)); safestrncpy(data.eventname, event, sizeof(data.eventname)); if (!mob_parse_dataset(&data)) return 0; md = mob_spawn_dataset(&data); mob_spawn(md); md->party_id = party_id; // BG Team ID return md->bl.id; }
Thanks for those who will help
Note: I also edited the script.h and mob.h parts but I did not include since I don't think it is related here.
-
Hi,
Is this a normal behavior on renewal type of servers? Damage is really low even on high str and better weapon only on mobs. I attach images for more info
Dealing only 25 damage at 114 str??
Maybe I messed up with some parts while modifying servers but anyone who got idea where?
Here are damages between MONSTERS:
PLAYERS:
-
23 minutes ago, celeron0134 said:
up
use search engine. @Stolao had made this one already.
-
On 2/13/2018 at 7:45 AM, maken06 said:
Does the rank differ from those who use dead branches or bloody branches?
as long as the mvps are not not spawned in the maps listed, it shoudnt work.
-
hi,
ive been trying to add conditional operator in the quest shop npc but i dont get it successfully.
i tried setarray .Shops$[1] , "Menu 1", (.var >= 2) ? "Menu 2":""; but when i reched the var 2 condition, it doesnt appear in me
edit: found an alternative way
-
On 2/12/2018 at 4:21 PM, RARM said:
I’m looking for a bot tracker that would use command @hide to player and ask player a random mathematical question for example ask a player “6+4” if player gets the answer wrong 6 times then npc would use command @jail and have player(or bot) in jail for 2-5mins. If player gets the answer right then npc will leave the player alone until he relogs again.
you could do an npc kill trigger event. when it reaches to a certain number of kills, player must enter the md5 has code generated by the npc. i wish i could be any help but too bad i cant use my pc for a while cuz our internet connection is out.
-
hi,
i dont know what title to use but here is what i mean.
how to make npc loop get item until specific times are reached? example:
i want to make ITEM A x 10.
instead of using getitem ID,AMT; i want it to loop getitem for 10 times.
why? i want to add 50% chance to get ITEM A when being produced by the npc. so the end result, i would only get ITEM A x SUCCESSFUL ITEM PRODUCED instead of getting 10 pcs.
yes, im making my self complicated for one of my crazy stuff in mind. thanks to whoever is willing to help.
Edit:
found my answer at script_command.txt thanks ???
-
6 hours ago, BugSICK said:
i try it but still its not dropping. i use the card in my acce. but no drop
4262,Evil_Cloud_Hermit_Card,Cloud Hermit Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12029,RC_Plant,100000; },{},{}
try check your conf/battle/drops.txt you cen see the card modify drop rates and adjust it from there
-
9 hours ago, Secrets said:
Pseudocode, but I think you can get what I want to show here
- script secret -1,{ OnFoo: $evt_tick = gettimetick(2); addtimer "somenpc::someevent",.delay_tick; end; OnInit: .delay_tick = youreventdelay; .@difftick = gettimetick(2) - $evt_tick; if(.@difftick < 0) { // timer still not elapsed addtimer "somenpc::someevent",.@difftick; } else { donpcevent "somenpc::someevent"; }
i will try my best to comprehend thanks ????
-
hi,
im currently modifying quest shop. i added a success rate when requirements are submitted. it works well especially if its an equipment but when i start making useable items such as potions, here comes the problem:
i tried making 503(quest item) x 10pcs. yes, success rate worked however, it works as bundle. i mean success rates applied to all 10 pcs of 503. the way how i wanted the success rate is to work on each of the 10x of 503 item i crafted. so probably around 5-7pcs will successfully be crafted and everything else wont.
here is how I coded it. (i cant copy paste the code since im on mobile cuz our internet connection is under repair)
.@rate = 50;
if(.@rate >= rand(0,100)) {
getitem .@q[0],.@q[2];
}
note: this is from quest_shop of euphy at npc/custom/quest/ folder
thanks
edit: SOLVED BY USING LOOP
-
12 hours ago, Sehrentos said:
I don't think there is a way to continue npc timer after a reload.
Maby OnClock event or other workaround ?
- script DayNight -1,{ OnClock0600: day; end; OnInit: // setting correct mode upon server start-up if (gettime(DT_HOUR)>=6 && gettime(DT_HOUR)<18) end; OnClock1800: night; end; }
i have thought of this already. it doesn't really fit the need of the script i'm currently working on with. maybe i should just work around with my idea and use OnClock. thanks anyways
-
hi,
how do i make an npc continue doing a certain event even server is being reset?
to further explain:
<code>
npc x = trigger an event where event will last for 1 hr.
after an hour, event will end.
if server is being reset or shutdown while event is being triggered, the NPC timer will pause and will resume after server is up again
<code>
i already tried OnTimerXXXX codes but it terminates the event after server is reset.
any other available options for me? tia
im on mobile, dont know how to make codebox x.x
update:
i added initnpctimer at OnInit label. however, it restarts the timer to 0.
-
you can always use it as reference code. maybe you can dig up the whole src to change the standard looting behavior
-
Automated MVP ladder & reward system
New Feature:
* Event will only trigger to MVPs in their respective maps..
* If Amon Ra is killed outside moc_pryd06, script wont trigger..Header
Spoiler//===== rAthena Script =======================================
//= Automated MVP Ladder and reward system
//===== By: ==================================================
//= pajodex
//===== Current Version: =====================================
//= 4.0
//===== Compatible With: =====================================
//= rAthena Project (pajodex)
//===== Description: =========================================
/*- MVP Ladder which is fully automated.
- Just leave it on and NPC will do the rest.
- Easy configure
- Added @mvpreset command to reset the ladder. It will also reset the
monthly and weekly if it is on the '.day' and '.week' at settings
- Updated with latest mail command https://github.com/rathena/rathena/commit/5b13dc7009e312585bba0ea55d77fc5afa8aecadNew Feature:
* Event will only trigger to MVPs in their respective maps..
* If amon ra is killed outside moc_pryd06, script wont trigger..
*/
//=====******** Note ********=================================
//= if you find bugs or problem, please do tell DM me at
//= Discord (pajodex#1328) or rAthena (pajodex)
//= open for suggestions
//===== Additional Comments: =================================
// 1.0 - Initial release (MVP Kill standalone)
// 2.0 - Added SQL based with ladder
// Added automatic reward system
// Added functions
// Added bitwise variables
// Optimization
// 2.1 - Cleaned the script
// updated title
// 2.2 - Fixed error on reward if players are offline
// 2.3 - Added nobranch mapflags to all maps listed (Sukea23 via discord)
// 2.4 - Ranking fixed (reported by Sukea23)
// 3.0 - Script optimization and re-work
// added new ranker feature : view your rank
// added mvp ladder points system
// added simple mvp ladder shop
// 3.1 - Fix ranking issues on tie-cases (reported by Heikenz) https://rathena.org/board/topic/114565-utility-automated-mvp-ladder-reward-system/?do=findComment&comment=344981
// added item as currency support in ladder shop (Heikenz)
// modified F_CheckMvpLadder function
// Special Thanks to : AnnieRuru for mentoring me.
// 4.0 - Updated to latest svn
// Now uses *mail script command. You must UPDATE your trunk
// or apply this commit https://github.com/rathena/rathena/commit/5b13dc7009e312585bba0ea55d77fc5afa8aecad
// Script Optimization
// Script Rework
// Now uses a new SQL table that utilizes InnoDB instead of MyISAM
// -------------------------------------------------------
// How to use F_MVPReward:
// F_MVPReward ( <tablename>, <Num of players to get reward (default : 10)>, <rewardarrays> )
// This will allow you to set the number of players to receive
// the rewards. For small population server, you can set this to 5 or
// any amount as you wish.
// This update is in-response to Holograma's question in the post:
// https://rathena.org/board/topic/114565-utility-automated-mvp-ladder-reward-system/?tab=comments#comment-341725
//===== Credits goes to: =====================================
//= hurtsky
//= secret
//= sader1992
//= Stolao
//= Euphy
//= AnnieRuru
//=============================================================Config table:
Spoiler// Bitwise Variables
// 1 = enable daily reward and record
// 2 = enable weekly reward and record
// 4 = enable monthly reward and record
// 8 = enable mvp ladder item reward when killing MVP
// 16 = enable mvp ladder points when killing MVP
.Option = 1|2|4|8|16;
// NPC Name
.nm$ = "[ ^FF0000MVP Ranker^000000 ]";
// Point rewarded when mvp is killed (if Option 16 is enabled)
.point = 100;
// Chance of getting an item (if Option 8 is enabled)
.chance = 80;
// Day of the month to automatically get reward
.day = 1;
// Day of the week
.week = SUNDAY;
setarray .reward, // rewards for mvp killing
501, 10, // Solo reward <item>, <amt>
501, 5; // Party reward <item>, <amt>
// daily top 10 reward <ID>,<AMOUNT>,<ZENY>
setarray .daily_rwd,
607,3,1000, // top 1
607,2,1000,
607,2,1000,
607,2,1000,
607,2,1000,
607,2,1000,
607,2,1000,
607,2,1000,
607,2,1000,
607,1,1000; // top 10
// weekly top 10 reward <ID>,<AMOUNT>,<ZENY>
setarray .weekly_rwd,
607,3,10000, // top 1
607,2,10000,
607,2,10000,
607,2,10000,
607,2,10000,
607,2,10000,
607,2,10000,
607,2,10000,
607,2,10000,
607,1,10000; // top 10
// monthly top 10 reward <ID>,<AMOUNT>,<ZENY>
setarray .monthly_rwd,
607,3,100000, // top 1
607,2,100000,
607,2,100000,
607,2,100000,
607,2,100000,
607,2,100000,
607,2,100000,
607,2,100000,
607,2,100000,
607,1,1000; // top 10
// use @mvpreset command to reset the ladder. It will also reset the ...
// ... montly and weekly if it is on the .day and .week settings from above
bindatcmd("mvpreset" ,strnpcinfo(0)+"::OnReward",99,99);
// No branch mapflags on the maps listed..
for(.@i = 0; .@i < getarraysize(.t_maps$); ++.@i)
setmapflag .t_maps$[.@i], mf_nobranch;
// ladder shop
npcshopdelitem "mvp_ladder_shop_q", 607;
for(.@i = 0; .@i < getarraysize(.Shop); .@i = .@i + 2)
npcshopadditem "mvp_ladder_shop_q", .Shop[.@i], .Shop[.@i + 1];
waitingroom "MVP LADDER!",0;Q: What makes this special and different to other MVP Ladders?
QuoteI guess the auto - ladder reset and reward can make this special and definitely different. Configs are so easy even a 7 y.o. can set the config xD
Q: Why sell it instead of free releaase?
QuoteAside from the time and effort I spent writing this, I also want to help rAthena grow and continue
By downloading this file, you agree with my Terms of Service:
• You are not allowed remove my signature from any of the included files.
• You are not allowed sell, resell or in any form for money or rewards using my work.
• You are not allowed claim my work as yours.
• I have the rights to change all the terms above without prior notice.
-
Submitter
-
Submitted02/02/2018
-
Category
-
Video
-
Content Authorpajodex
-
1
-
-
use greed skill by white smith?
-
check this post
read the reply by @BrOgBr
-
17 hours ago, fckng said:
I've done everything in relation to conf / db I read several reports that it is in source, but I tried and I could not either
Are you using latest rA? I'm not having any problem with it tho.
-
On 2/5/2018 at 2:11 AM, fckng said:
-I tried ground targetted skill.
- But only animation occurs it doesn't push the traps nor do any damage.
I'm having problems at AC_SHOWER used in area, is not dealing damage, only does skill animation I visualized several topics and none had any solution
Check your conf/battle/skill.conf
-
you can add this and make a custom menu for this code:
query_sql "TRUNCATE TABLE `add_your_table_here`"; // add the sql table
-
Hi,
Is it possible to increase weapon forge success rate of blacksmiths skills thru item script bonus? Thanks.
-
1 minute ago, Pink Guy said:
It's attached on my first post. I really appreciate your help!
Can't view. I'm on mobile. Anyways, try looking at atcmd.hpp.
-
Show how me you coded @go in your src. I think you have something to to at other part aside from atcmd.cpp. Check atcmd.hpp. I'm not at home I can't check it
-
Did you compile your mapserver? Or ran the map cache.
Adding char id to an array.
in Scripting Support
Posted
sweet thanks! Now things have more sense