You can define itemshop:
-%TAB%itemshop%TAB%<NPC Name>%TAB%<sprite id>,<costitemid>{:<discount>},<itemid>:<price>{,<itemid>:<price>...}
where costitemid = 6379
And then just callshop this itemshop in case 4
callshop "<name>",<option>;
callshop "<name>",<option>;
I think this could be done via script with 'OnPCBaseLvUpEvent' label, rough outline:
OnPCBaseLvUpEvent:
if (BaseLevel = 50) { script of choosing 1st job here }
else if (BaseLevel = 100) { script of choosing 2nd job here }
else if (BaseLevel = 200) { up to Trans script }
end;
After OnInit: add variable for base chance
.craft_rate = 50;
Before getitem .@q[0],.@q[2]; add this
if ( rand(100) > (.craft_rate + readparam(bLuk)/10 + readparam(bDex)/6) ) {
mes "[Quest Shop]";
mes "Item creation was failed.";
close;
}
skill_cast_db.txt
//-- WZ_METEOR
83,9600,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,0,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,5000,0,2400
2000:3000:3000:4000:4000:5000:5000:6000:6000:7000
This is number of meteors at skill level
src\map\skil.cpp
int skill_counter_additional_effect
...
if( (attack_type&(BF_WEAPON|BF_SHORT)) == (BF_WEAPON|BF_SHORT) ) {
sp += sd->bonus.sp_gain_value;
sp += sd->sp_gain_race[status_get_race(bl)] + sd->sp_gain_race[RC_ALL];
hp += sd->bonus.hp_gain_value;
}
If you change condition like this
if( attack_type&BF_WEAPON )
It will work with physical melee and ranged attacks
Double check this:
if( countitem (.@items[.@i]) ) goto L_NotEnough;
If I have this item then I go to L_NotEnough?
Probably should be:
if( !countitem (.@items[.@i]) ) goto L_NotEnough;