Jump to content

SOSKaito

Members
  • Posts

    1
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

SOSKaito's Achievements

Poring

Poring (1/15)

  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Hello everyone. I've tried for like 8 hours now to make this work, but i've only had partial success. What I'm trying to do is implementing the 2019 Warlock update, which makes Reading Spellbook a passive skill and transfers the effect to the spellbooks themselves, also eliminating the choice menu in the process. What I did is : I turned WL_READING_SB into a passive skill in the skill_db I modified the case for WL_READING_SB in skill_castend_nodamage_id as follows case WL_READING_SB: if (sd) { struct status_change *sc = status_get_sc(bl); for (i = SC_SPELLBOOK1; i <= SC_MAXSPELLBOOK; i++) if (sc && !sc->data[i]) break; if (i == SC_MAXSPELLBOOK) { clif_skill_fail(sd, WL_READING_SB, USESKILL_FAIL_SPELLBOOK_READING, 0); break; } skill_spellbook(sd,flag); clif_skill_nodamage(src, bl, skill_id, skill_lv, 1); } break; so it no longer pops open a menu and instead directly goes into skill_spellbook using the flag to store the Spellbook ID This works wonderful if executed in an AtCommand as follows ACMD_FUNC(spellbookcast) { nullpo_retr(-1,sd); skill_castend_nodamage_id(&sd->bl,&sd->bl,WL_READING_SB,1,gettick(),atoi(message)); return 0; } This command functions with the syntax "@spellbookcast <BookItemID>" and will successfully memorize the spellbook that is submitted. Now i've tried to make a script command "memorizeskill" that works the same. The Spellbook should remain in the Inventory and execute the Skill WL_READING_SB with flag = BookItemID My Code : BUILDIN_FUNC(memorizeskill) { TBL_PC* sd; if(!(script_rid2sd(sd))) return SCRIPT_CMD_FAILURE; skill_castend_nodamage_id(&sd->bl,&sd->bl,WL_READING_SB,1,gettick(),script_getnum(st,2)); return SCRIPT_CMD_SUCCESS; } This however, does not work. Edit: To clarify, this script command would later be used in the script of the Spellbooks themselves. Example : Fire Bolt Spellbook (ItemID : 6189) has the script "memorizeskill 6189;" and the script command should give the ItemID to the skill logic to memorize the spell. Just like the AtCommand. Any help would be appreciated. Edit2: This can be closed, the problem was something very dumb (If you change existing speelbooks into usable items make sure to actually set the equipable jobs field to warlock and the gender field to 2). Hope you had a good laugh, because i sure am.
×
×
  • Create New...