God...I wish scripting could stay in my head better, and it wasn't so hard to learn!!!!
anyways, I don't know how easy or hard this is, but to me it sounds rather simple:
The player finds a book with a sword in it. when the player grabs it, in the inventory the item will be in the Misc. tab called "Sword in book". When the player uses it, it gives the player both the book, and the sword. WAIT! but thats not it. the book is supposed to be cursed! so, it should also cast an effect on the player. Just a random magic spell that lasts x amount of time is fine, but if possible, could it give a disease?
if it is possible, post (IN EXTREME!! I cannot emphasize that word enough) detail how I can go about this. or just write the script and I fill in the variables that you do not know. (if you do option B, let me know what variable needs to go there, example, if you need the swords ID, just place "swordsID" so I know to put that in)
thank you all for being so helpful to me in my past posts! Hopefully you will be able to help me again!
(oh and if it is not possible, be sure to let me know, so I don't continue to bug you guys about it)
A script similar to what I am talking found in one of my loaded mods:
Spoiler
scriptname RCSeasonsRandomPresentScript
short RCRandomRoll
begin onEquip
Set RCRandomRoll to GetRandomPercent
if (RCRandomRoll <=75)
MessageBox "The present contained 25 Gold."
player.additem gold001 25
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=80)
MessageBox "The present contained 300 Gold."
player.additem gold001 300
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=83)
MessageBox "The present contained a Blackheart Pendant."
player.additem RCSeasonsBlackheartPendant 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=85)
MessageBox "The present contained a Blackheart Ring."
player.additem RCSeasonsBlackheartRing 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=88)
MessageBox "The present contained an Rusty Tankard."
player.additem RCSeasonsRustyMug 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=90)
MessageBox "The present contained an Enchanted Tankard."
player.additem RCSeasonsMugEn 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=93)
MessageBox "The present contained a Yuletide Hat."
player.additem RCXmasHat001 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=95)
MessageBox "The present contained an Enchanted Yuletide Hat."
player.additem RCXmasHat003 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
else
MessageBox "The present contained a Snowman mask."
player.additem RCSnowmanMask 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
endif
end
short RCRandomRoll
begin onEquip
Set RCRandomRoll to GetRandomPercent
if (RCRandomRoll <=75)
MessageBox "The present contained 25 Gold."
player.additem gold001 25
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=80)
MessageBox "The present contained 300 Gold."
player.additem gold001 300
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=83)
MessageBox "The present contained a Blackheart Pendant."
player.additem RCSeasonsBlackheartPendant 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=85)
MessageBox "The present contained a Blackheart Ring."
player.additem RCSeasonsBlackheartRing 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=88)
MessageBox "The present contained an Rusty Tankard."
player.additem RCSeasonsRustyMug 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=90)
MessageBox "The present contained an Enchanted Tankard."
player.additem RCSeasonsMugEn 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=93)
MessageBox "The present contained a Yuletide Hat."
player.additem RCXmasHat001 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
elseif (RCRandomRoll <=95)
MessageBox "The present contained an Enchanted Yuletide Hat."
player.additem RCXmasHat003 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
else
MessageBox "The present contained a Snowman mask."
player.additem RCSnowmanMask 1
removeme
; player.removeitem RCXmasRandomPresent 1
return
endif
end
Remove all the random rolls, make a few changes here and there, put in MY item names, and that should work for the book and sword correct?
Now what about the magic effect?
Oh, one last thing.
If I gave someone two .dds files, could you put one (a sword) ontop of the other (a book) to represent the sword in the book? You know, the icon for when this item is in the players inventory.