Jump to content

Need a weidu code svp


deratiseur

Recommended Posts

COPY_EXISTING_REGEXP GLOB ~.*\.itm~ override PATCH_IF SOURCE_SIZE>0x71 BEGIN
 READ_SHORT 0x1c item
 PATCH_IF item=0xb BEGIN
   arc=0
   GET_OFFSET_ARRAY ab_arr ITM_V10_HEADERS
   PHP_EACH ab_arr AS i => ab_off BEGIN
  GET_OFFSET_ARRAY2 ef_arr ab_off ITM_V10_HEAD_EFFECTS
  PHP_EACH ef_arr AS i2 => ef_off BEGIN
    READ_SHORT ef_off op
    PATCH_IF op=147 BEGIN // the 'learn spell' opcode
	  READ_ASCII ef_off+0x14 spell (8) NULL
	  PATCH_IF FILE_EXISTS_IN_GAME ~%spell%.spl~ BEGIN
	    INNER_ACTION BEGIN
		  COPY_EXISTING - ~%spell%.spl~ override PATCH_IF SOURCE_SIZE>0x71 BEGIN
		    READ_SHORT 0x1c tp
		    PATCH_IF tp=1 BEGIN // spell type is arcane
			  arc=1
		    END
		  END
	    END
	  END
    END // PATCH_IF op=147
  END
   END
   PATCH_IF arc BEGIN
  WRITE_BYTE 0x2f (THIS | 32)
   END
 END // PATCH_IF item=0xb
END BUT_ONLY

Link to comment

Thanks, this works :)

 

My mage kitted pc cannot "use" the scrolls "Contingency" and "Wish" passed "universal" by Spell revision, and this is what i ask first. Thanks.

 

But i saw another problem. He can "Learn" from thems. He has the 0x00003FC0 opcode (in fact, 0x00003FE0 to add the undead hunter code), so he's considered specialist of all schools and have all scrolls forbidden..... except for the scrolls passed "universal" (no school) by Spell revision.

 

Have you an idea to fix this ? (at final, i wish a mage kit that cannot use scrolls at all and cannot learn from thems.)

Link to comment

Ok, i have find how to fix this.

 

I still use the weidu code that Ardanis gave to me, it works fine, making the scrolls "red in inventory" for the kit

For the "he can learn from these scrolls" problem, i have fix this be using the opcode #101 [protection from opcode] -> protection from opcode #147 [learn spell]

 

Thanks for your help, again :)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...