-
Posts
82 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Norse
-
-
7 hours ago, Dissidia said:
Replace to this:
if(sd->inventory_data->type == IT_CHARM)pc.c: In function ‘pc_additem’:
pc.c:4601:23: error: request for member ‘type’ in something not a structure or union
if(sd->inventory_data->type == IT_CHARM)
^
make[1]: *** [obj/pc.o] Error 1Still no luck.
-
Can someone help us update this, because it not compatible with latest rA. Original topic from here.
SpoilerIndex: common/mmo.h =================================================================== --- common/mmo.h (revision 14843) +++ common/mmo.h (working copy) @@ -175,6 +175,7 @@ IT_UNKNOWN2,//9 IT_AMMO, //10 IT_DELAYCONSUME,//11 + IT_CHARM, IT_CASH = 18, IT_MAX }; Index: map/clif.c =================================================================== --- map/clif.c (revision 14843) +++ map/clif.c (working copy) @@ -59,7 +59,7 @@ //Converts item type in case of pet eggs. inline int itemtype(int type) { - return ( type == IT_PETEGG ) ? IT_WEAPON : type; + return ( type == IT_PETEGG ) ? IT_WEAPON : ( type == IT_CHARM )? IT_ETC : type; } #define WBUFPOS(p,pos,x,y,dir) \ Index: map/itemdb.c =================================================================== --- map/itemdb.c (revision 14843) +++ map/itemdb.c (working copy) @@ -196,6 +196,7 @@ case IT_PETARMOR: return "Pet Accessory"; case IT_AMMO: return "Arrow/Ammunition"; case IT_DELAYCONSUME: return "Delay-Consume Usable"; + case IT_CHARM: return "Charms"; case IT_CASH: return "Cash Usable"; } return "Unknown Type"; @@ -371,6 +372,7 @@ case IT_ARMOR: case IT_PETEGG: case IT_PETARMOR: + case IT_CHARM: return 0; default: return 1; @@ -388,6 +390,7 @@ case IT_ARMOR: case IT_PETEGG: case IT_PETARMOR: + case IT_CHARM: return 0; default: return 1; @@ -736,7 +739,7 @@ id->type = atoi(str[3]); - if( id->type < 0 || id->type == IT_UNKNOWN || id->type == IT_UNKNOWN2 || ( id->type > IT_DELAYCONSUME && id->type < IT_CASH ) || id->type >= IT_MAX ) + if( id->type < 0 || id->type == IT_UNKNOWN || id->type == IT_UNKNOWN2 || ( id->type > IT_CHARM && id->type < IT_CASH ) || id->type >= IT_MAX ) {// catch invalid item types ShowWarning("itemdb_parse_dbrow: Invalid item type %d for item %d. IT_ETC will be used.\n", id->type, nameid); id->type = IT_ETC; Index: map/pc.c =================================================================== --- map/pc.c (revision 14843) +++ map/pc.c (working copy) @@ -3444,6 +3444,7 @@ clif_updatestatus(sd,SP_WEIGHT); //Auto-equip if(data->flag.autoequip) pc_equipitem(sd, i, data->equip); + if(data->type == IT_CHARM) status_calc_pc(sd,0);//dh return 0; } @@ -3452,6 +3453,7 @@ *------------------------------------------*/ int pc_delitem(struct map_session_data *sd,int n,int amount,int type, short reason) { + int mem = 0; nullpo_retr(1, sd); if(sd->status.inventory[n].nameid==0 || amount <= 0 || sd->status.inventory[n].amount<amount || sd->inventory_data[n] == NULL) @@ -3462,6 +3464,7 @@ if(sd->status.inventory[n].amount<=0){ if(sd->status.inventory[n].equip) pc_unequipitem(sd,n,3); + mem = sd->inventory_data[n]->type; memset(&sd->status.inventory[n],0,sizeof(sd->status.inventory[0])); sd->inventory_data[n] = NULL; } @@ -3470,6 +3473,8 @@ if(!(type&2)) clif_updatestatus(sd,SP_WEIGHT); + if(mem == IT_CHARM) status_calc_pc(sd,0);//dh + return 0; } Index: map/status.c =================================================================== --- map/status.c (revision 14843) +++ map/status.c (working copy) @@ -1872,6 +1872,16 @@ pc_delautobonus(sd,sd->autobonus2,ARRAYLENGTH(sd->autobonus2),true); pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),true); + for ( i=0; i < MAX_INVENTORY; i++ ) { //dh + if ( !sd->inventory_data[i] || sd->inventory_data[i]->type != IT_CHARM ) + continue; + if ( sd->inventory_data[i]->script && sd->inventory_data[i]->elv <= sd->status.base_level && sd->inventory_data[i]->class_upper ) { + run_script( sd->inventory_data[i]->script, 0, sd->bl.id, 0 ); + if ( !calculating ) //Abort, run_script retriggered this. [Skotlex] + return 1; + } + } + // Parse equipment. for(i=0;i<EQI_MAX-1;i++) { current_equip_item_index = index = sd->equip_index[i]; //We pass INDEX to current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
i got error at
SpoilerCC pc.c pc.c: In function ‘pc_additem’: pc.c:4601:5: error: ‘data’ undeclared (first use in this function) if(data->type == IT_CHARM) ^ pc.c:4601:5: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [obj/pc.o] Error 1
-
What i want is something like this scripts.
add new item 501,Red_Potion,Red Potion,0,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "CustomBox"; },{},{} function script CustomBox { setarray .BoxItems[0],501,502,503; set .Random, getarraysize( .BoxItems ); getitem .BoxItems[ rand( .Random ) ], 1; end; }
But with some mod, the item is enhance randomly to.
-
I need someone help to make box script for random item with random with random enhancement. And the enhancement must be at the 4th slot. Please help me if this possible.
-
Any update?
-
On 5/9/2017 at 3:57 PM, Technoken said:
What git hash are you using?
If you believed that this is actually a bug from rathena, you can help the devs by reporting it here->https://github.com/rathena/rathena/issues
I will try to update my rAthena 1st then.
-
On 5/9/2017 at 9:02 PM, Radian said:
@Norse I tried to produced the same issue you got but its working perfect on me. you might modified something in source or maybe what emulator are you using rA? eA? Herc? eAmod? rAmod?
Im using rA.
-
This happen after i changed maximum cart weight from 16,000 to 8,000.
1) Player max out their cart @ 8000
2) Player release cart and re log
3) Rent cart again, the cart will be 0/8000
4) Max out the cart again @ 8000
5) Re log, the cart weight will be 16,000/8,000
6) This can be repeating until unlimited weight of cart.
Need help to solve this.
-
@Skorm Thanks for the ideas!
-
Bump again
-
Bump
-
Need some help.
-
Bump
-
Okay,can someone help me?
-
Still waiting~
-
Someone? Still need some help.
-
... another
boringquest script request ...that hunting mission script made by Euphy I can easily replicate
so you want all the features in that script remain intact, but
1. change baseexp/jobexp/zeny reward into a variable, which can later use to buy stuffs in currency shop ?
2. I don't understand what you mean by using SQL table, what kind of data you want them inside ?
3. The MHM NPC will give random monsters to hunt. (Adjustable/Setable) <-- adjustable by GMs, or adjustable by players ?
you mean players can choose the amount of monsters to hunt, so they'll get lesser/bigger reward based on their free time on that day ?
4. There is time limit for this mission. (Adjustable/Setable) <-- in script ?
5. so how many variables you need in this script ?
sounds like need 2 ... 1 variable for buying stuffs, another 1 variable for the total accumulated for bonus stats ?
and this script isn't hard ... seriously
if I omit all the dialog, the script will probably just around 200 lines
1. Yes, into a variables, which can later use to buy stuffs in currency shop.
2. For both variables,so i can look and edit it easily (lol)
3. Only adjustable by GMs,because i want to choose what monster that will be random for hunting,not random from mob_db.( I want set/choose the random monster that the NPC will give,including the amount of monsters.
4. Yes,adjustable in scripts.
5. And yes,2 variables for buying stuff and total accumulated for bonus stats.
Really need your help Annie
-
Bump
-
Bump Bimp Bamp!
-
Thanks Annie.
-
Mind to share?
-
Thank you for replying. I saw this script somewhere,it is close enough,but still need some modifications. Because i want the Mission Point to measure extra stats points that players will receive on login(change depends on players current Mission Point,if players have 100 MP they will receive Allstats +1 bonus on login and 300 MP for Allstats + 3 bonus etc). Not to buy or trade with item. Plus i don't want the Base Exp, Job Exp, and Zeny rewards.
-
Can i request a Monster Hunting Mission scripts.
- The MHM NPC will give random monsters to hunt. (Adjustable/Setable)
- Number of monster can be set. (Adjustable/Setable)
- There is time limit for this mission. (Adjustable/Setable)
- The rewards of this mission is you will receive Mission Point (Adjustable/Setable and SQL version maybe?)
- The Mission Point will give you extra stats OnPCLoginEvent. Example :
- If players have 100 Mission Point you will receive Bonus Allstats +1
- If players have 500 Mission Point you will receive Bonus Allstats +3
- If players have 1000 Mission Point you will receive Bonus Allstats +5 and so on.(Adjustable/Setable)
6. Whenever you die(Suicide is included),the Mission Point will decrease (Adjustable/Setable)
7. Players can check their Mission Point from this NPC.
Sorry for my English,i hope someone can get this hard scripts done.
-
I hope someone can make the 300 Monster Challenge working with the new SVN
Random Option
in Scripting Support
Posted
Also need this