Jump to content

joecalis

Members
  • Content Count

    21
  • Joined

  • Last visited

Everything posted by joecalis

  1. Looks like no one knows how this works so I'm gonna have to give up on this skill T_T
  2. Yeah I tried to do that also thats why I have SC_GRUESOME_ZONE But it doesn't seem to affect the visual effect, it only stores the group id of the skill.
  3. BUMP! Sorry I really need this to work.
  4. I tried to create a skill which mimics an effect like bragi where the wierd symbols/letters follow the character as they walk, and who ever enters the area gets damaged. I know I setup everything correctly but I encountered a problem, while the skill area that damages everyone who enters follow my character, the visual effect stays on the ground where I first casted it as shown in this vid. And also the skill does not seem to end at the set amount of time limit either, here are the important skill information: skill_db.txt 1026,0,6,4,-1,0x41,0,1,1,no,0,0,0,weapon,0, CS_GRUESOME_ZONE,Gruesome Zone skill_cast_db.txt //-- CS_GRUESOME_ZONE1026,0,3000,3000,10000,0,0,0 skill_unit_db.txt 1026,0xa3, , -1, 0, 500,enemy, 0x000 //CS_GRUESOME_ZONE map.c at map_moveblock if (sc->data[SC_GRUESOME_ZONE]){ skill->unit_move_unit_group(skill->id2group(sc->data[SC_GRUESOME_ZONE]->val4), bl->m, x1-x0, y1-y0); }
  5. cool so I can just call it as buff like "sc_start(src, src, SI_BERSERK, 100, skill_lv, skill->get_time2(skill_id,skill_lv))"? Edit: NVM I found it, I used clif->status_change.
  6. Is there anyway to have a skill special effect stay at a desired amount of time? For example if I want to have a skill with berserk (redbody) special effect, body will go back to normal after the skill is dispelled. Is it possible to do that through src and/or lua edit? Most of the stuff I ask here gets the answer "You have to hex edit" And as far as I know, my hex editing skills are over negative 9000 so hex edit is a no no. Anyway if anyone knows if this is possible please answer right away, I really need it Edit: I've tried doing clif->specialeffect on skill start and then refresh all pc in view when the skill ends, but the warping animation (change to black screen) is just annoying. I have tried to use the OPTs in status.c (opt3_berserk) but it seems like it only stores body state data and does not affect client animation, only the opt1, opt2, and option has effects on the client and sadly it does not include berserk effect.
  7. I have just tested this and I was wondering if this is a bug or something. I had a character with infinite endure while sitting, normal attacks and single hit skills doesn't make it stand, but multi-hit skills like Double Strafe, Double Attack,Sonic Blow causes the player to stand. I already tried modifying pc_damage in pc.c where it says: if( pc_issit(sd) ) { pc->setstand(sd); skill->sit(sd,0); } to: if( pc_issit(sd) && !sc->data[SC_ENDURE_I]) { pc->setstand(sd); skill->sit(sd,0); } And just in case you're wondering how did I access sc->data in pc_damage I just simply added this: struct status_change *sc;sc = status->get_sc(src); Anyway that is my problem, can anyone please tell me how to fix this? I want the character to keep sitting even if hit by a multi-hit skill.
  8. NVM I figured it out, it turned out that "status->base_matk" actually calculates and sets the char's base matk. I modified a few things to make the passive work, I will share what I did for people who wants to do the same thing I did. in status.c find: unsigned short status_base_matk(const struct status_data *st, int level) {#ifdef RENEWAL return st->int_+(st->int_/2)+(st->dex/5)+(st->luk/3)+(level/4);#else return 0;#endif} change to: unsigned short status_base_matk(const struct status_data *st, int level, struct map_session_data *sd) {int skill_lv, total = 0;#ifdef RENEWAL total = st->int_+(st->int_/2)+(st->dex/5)+(st->luk/3)+(level/4); if((skill_lv=pc->checkskill(sd,CS_MATK_MASTERY))>0) total += total*skill_lv/100; return total;#else return 0;#endif} find: st->matk_min = st->matk_max = bl->type == BL_PC ? status->base_matk(st, level) : level + st->int_; change to: st->matk_min = st->matk_max = bl->type == BL_PC ? status->base_matk(st, level, sd) : level + st->int_; find: *matk_min = status->base_matk(st, status->get_lv(bl)); change to: *matk_min = status->base_matk(st, status->get_lv(bl), sd); in status.h find: unsigned short (*base_matk) (const struct status_data *st, int level); change to: unsigned short (*base_matk) (const struct status_data *st, int level, struct map_session_data *sd); in pc.h find: #define pc_leftside_matk(sd) (status->base_matk(status->get_status_data(&(sd)->bl), (sd)->status.base_level)) change to: #define pc_leftside_matk(sd) (status->base_matk(status->get_status_data(&(sd)->bl), (sd)->status.base_level, (sd))) in skill.c find: heal = 5 * status->get_lv(&hd->bl) + status->base_matk(&hd->battle_status, status->get_lv(&hd->bl)); change to: heal = 5 * status->get_lv(&hd->bl) + status->base_matk(&hd->battle_status, status->get_lv(&hd->bl),sd);
  9. So which is the right code to change the base matk because there is no "bstatus->base_matk" and the base_matk I used to get the char's current base matk is a function not a bstatus data therefore I could not change it's value.
  10. So I've been working on a couple of passive skills, all were fine except for this one. I'm not gonna post all the codes in diff files because there are just too many, but here is the part I am mostly having a problem on. I need to have this skill add 1% Base MATK (the first number that shows in the stat window under MATK) every skill level heres what I have in Status.c // ----- MATK CALCULATION -----if((skill_lv=pc->checkskill(sd,CS_MATK_MASTERY))>0){ bstatus->matk_min += (int)status->base_matk(bstatus,sd->status.base_level)*skill_lv/100; if(bstatus->matk_min > bstatus->matk_max) bstatus->matk_max = bstatus->matk_min;} if you are wondering the part is just to get the characters current base_matk which works perfectly fine as I have tried it. The part I am so confuzzled about is changing "bstatus->matk_min" or "bstatus->matk_max" does not change the character's current matk stat. But "bstatus->batk" and all other "bstatus->etc." works except for matk_min and matk_max. So my question is which is the right "bstatus" or any other code thingamajigie to change to be able to modify my character's current matk which shows at the stat window?
  11. But can I get the data from the columns selected and store it in an array?
  12. Thank you, just as I expected it would do that. But now I have alot to do, because I have like 25 columns to copy.
  13. joecalis

    skill cast db?

    For Stormgust skill_cast_db should be set like so: 89,<CastingTime>,<AfterCastAllSkillDelay>,<AfterCastWalkDelay>,<AnimationDuration>,<FreezeDuration>,<SkillCooldown> 1000 = 1 sec 1500 = 1.5 sec Example: if you want Stormgust 15 sec cast time 0 sec delay of all skill 0 sec walk delay 5 sec Animation 12 sec Freeze duration 1.5 sec Cooldown 89,15000,0,0,5000,12000,1500
  14. I was just wondering what the outcome will be if I do the following: query_sql("SELECT * FROM `awesome_table` WHERE `ID`=1",.@tempvar$); awesome_table: ID Name Val1 Val2 Val3 (int) (string) (int) (int) (int) 1 Hi 0 1 0 2 Hello 1 1 1 My question is, would it automatically store all the information in the row selected into the array like so: .@tempvar$[0] = 1 .@tempvar$[1] = "Hi" .@tempvar$[2] = 0 .@tempvar$[3] = 1 .@tempvar$[4] = 0 or would it only store the first value in the row? also would it automatically store the "int" values as "string"? Need reply fast please and thank you
  15. Thank you, do you know how to remove the letter "Z" on the shops? the one that shows like this: Apple 50 "Z" Banana 50 "Z" etc 1 "Z"
  16. So I tried modifying my vending skill to use Cashpoints instead of Zeny and coded it like this: vending.c at "vending_purchasereq" /*==========================================* Purchase item(s) from a shop*------------------------------------------*/void vending_purchasereq(struct map_session_data* sd, int aid, unsigned int uid, const uint8* data, int count) { int i, j, cursor, w, new_ = 0, blank, vend_list[MAX_VENDING]; double z; double cashPoints; struct s_vending vend[MAX_VENDING]; // against duplicate packets struct map_session_data* vsd = map->id2sd(aid); nullpo_retv(sd); if( vsd == NULL || !vsd->state.vending || vsd->bl.id == sd->bl.id ) return; // invalid shop if( vsd->vender_id != uid ) { // shop has changed clif->buyvending(sd, 0, 0, 6); // store information was incorrect return; } if( !searchstore->queryremote(sd, aid) && ( sd->bl.m != vsd->bl.m || !check_distance_bl(&sd->bl, &vsd->bl, AREA_SIZE) ) ) return; // shop too far away searchstore->clearremote(sd); if( count < 1 || count > MAX_VENDING || count > vsd->vend_num ) return; // invalid amount of purchased items blank = pc->inventoryblank(sd); //number of free cells in the buyer's inventory // duplicate item in vending to check hacker with multiple packets memcpy(&vend, &vsd->vending, sizeof(vsd->vending)); // copy vending list // some checks z = 0.; // zeny counter w = 0; // weight counter for( i = 0; i < count; i++ ) { short amount = *(uint16*)(data + 4*i + 0); short idx = *(uint16*)(data + 4*i + 2); idx -= 2; if( amount <= 0 ) return; // check of item index in the cart if( idx < 0 || idx >= MAX_CART ) return; ARR_FIND( 0, vsd->vend_num, j, vsd->vending[j].index == idx ); if( j == vsd->vend_num ) return; //picked non-existing item else vend_list[i] = j; z += ((double)vsd->vending[j].value * (double)amount); /*if( z > (double)sd->status.zeny || z < 0. || z > (double)MAX_ZENY ) { clif->buyvending(sd, idx, amount, 1); // you don't have enough zeny return; }*/ cashPoints = pc_readaccountreg(sd,script->add_str("#CASHPOINTS")); if( z > cashPoints || z < 0. || z > (double)MAX_ZENY ) { clif->buyvending(sd, idx, amount, 1); // you don't have enough zeny return; } cashPoints = pc_readaccountreg(vsd,script->add_str("#CASHPOINTS")); if( z + (double)vsd->cashPoints > (double)MAX_ZENY && !battle_config.vending_over_max ) { clif->buyvending(sd, idx, vsd->vending[j].amount, 4); // too much zeny = overflow return; } w += itemdb_weight(vsd->status.cart[idx].nameid) * amount; if( w + sd->weight > sd->max_weight ) { clif->buyvending(sd, idx, amount, 2); // you can not buy, because overweight return; } //Check to see if cart/vend info is in sync. if( vend[j].amount > vsd->status.cart[idx].amount ) vend[j].amount = vsd->status.cart[idx].amount; // if they try to add packets (example: get twice or more 2 apples if marchand has only 3 apples). // here, we check cumulative amounts if( vend[j].amount < amount ) { // send more quantity is not a hack (an other player can have buy items just before) clif->buyvending(sd, idx, vsd->vending[j].amount, 4); // not enough quantity return; } vend[j].amount -= amount; switch( pc->checkadditem(sd, vsd->status.cart[idx].nameid, amount) ) { case ADDITEM_EXIST: break; //We'd add this item to the existing one (in buyers inventory) case ADDITEM_NEW: new_++; if (new_ > blank) return; //Buyer has no space in his inventory break; case ADDITEM_OVERAMOUNT: return; //too many items } } //pc->payzeny(sd, (int)z, LOG_TYPE_VENDING, vsd); pc->paycash(sd, (int)z, 0); /* if( battle_config.vending_tax ) z -= z * (battle_config.vending_tax/10000.); */ //pc->getzeny(vsd, (int)z, LOG_TYPE_VENDING, sd); pc->getcash(vsd, (int)z, 0); for( i = 0; i < count; i++ ) { short amount = *(uint16*)(data + 4*i + 0); short idx = *(uint16*)(data + 4*i + 2); idx -= 2; // vending item pc->additem(sd, &vsd->status.cart[idx], amount, LOG_TYPE_VENDING); vsd->vending[vend_list[i]].amount -= amount; pc->cart_delitem(vsd, idx, amount, 0, LOG_TYPE_VENDING); clif->vendingreport(vsd, idx, amount); //print buyer's name if( battle_config.buyer_name ) { char temp[256]; sprintf(temp, msg_txt(265), sd->status.name); clif_disp_onlyself(vsd,temp,strlen(temp)); } } // compact the vending list for( i = 0, cursor = 0; i < vsd->vend_num; i++ ) { if( vsd->vending[i].amount == 0 ) continue; if( cursor != i ) { // speedup vsd->vending[cursor].index = vsd->vending[i].index; vsd->vending[cursor].amount = vsd->vending[i].amount; vsd->vending[cursor].value = vsd->vending[i].value; } cursor++; } vsd->vend_num = cursor; //Always save BOTH: buyer and customer if( map->save_settings&2 ) { chrif->save(sd,0); chrif->save(vsd,0); } //check for @AUTOTRADE users [durf] if( vsd->state.autotrade ) { //see if there is anything left in the shop ARR_FIND( 0, vsd->vend_num, i, vsd->vending[i].amount > 0 ); if( i == vsd->vend_num ) { //Close Vending (this was automatically done by the client, we have to do it manually for autovenders) [Skotlex] vending->close(vsd); map->quit(vsd); //They have no reason to stay around anymore, do they? } else pc->autotrade_update(vsd,PAUC_REFRESH); }} Everything is working fine, when I buy items it costs Cashpoints and the vendor gets Cashpoints too but the problem is, when You drag and drop items you want to buy it checks the price as Zeny instead of Cashpoints, so if you have 0 zeny when you try to buy something, the message "You do not have enough Zeny" shows at the chat and it wont transfer to the "Buying box". How do I make it so that It checks #CASHPOINTS instead of Zeny when I drag and drop items to the "Buying box".
  17. Can anyone please tell me how to edit the "Sales List" message shown when vending, it looks like this: I want to change the text like so, ~~~~~~~~~~Shop List~~~~~~~~~~ <Item Name> : <Price> Points ea Current Points : <#CASHPOINTS> ~~~~~~~~~~~~~~~~~~~~~~~~~~~ I tried looking for that in msgstringtable.txt, all the lua files, vending.c, clif.c, and messages.conf but I just can't seem to find it.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.