Benson Scripts

For questions relating to POL scripting (not necessarily related to WoD)

Moderators: Siobhan, Sebastian, Drocket

Benson Scripts

Postby Seawolf2k on Tue Aug 12, 2003 6:13 am

How hard would it be to alter the benson script to allow the magic oil to also be used to upgrade a current "low-level" skill buff item. For example you start with an fine ringmail tunic of magery and guarding. Apply the oil and now you have an indestructable Ringmail Tunic of magery and protection.
:?:
And 2 more questions. :roll:

1) what versions of POL are benson scripts compatable with?

2) This is way off topic but, if I wanted to create Roleplaying order shields (Like Sanc and many other shards) but wanted to make a couple with unique devices (I was thinking of a chinese symbol for honor)what would need to be done?

:oops: I know both of these are probably very complicated questions but Thank you in advance for all the help you can provide......
Seawolf2k
Jr. Newbie
 
Posts: 3
Joined: Mon Jul 28, 2003 5:59 pm
Location: Seattle Metro

Postby Drocket on Tue Aug 12, 2003 10:30 pm

Seawolf2k wrote:How hard would it be to alter the benson script to allow the magic oil to also be used to upgrade a current "low-level" skill buff item. For example you start with an fine ringmail tunic of magery and guarding. Apply the oil and now you have an indestructable Ringmail Tunic of magery and protection.


Um, probably not too hard. Toward the beginning of the Benson magic_potion script, it checks to make sure that they're not using it on an item that's already magical (if (IsMagicalItem (normal_item) )...) Instead of exiting at that point, you'd want to take them to a subfunction that would increase the properties of the item that it was used on.

A rough outline of the way that the code works would be...

Code: Select all
function UpgradeMagicItem (character, potion, magic_item)
var skilladv_id := GetObjProperty (magic_item, "skilladv");
if (!skilladv_id and skilladv_id != 0)
SendSysMessage (character, "Can't upgrade that");
return;
endif

var skilladv_amount := GetObjProperty (magic_item, "skill"+skilladv_id);
if (skilladv >= 10)
SendSysMessage (character, "This is as good as it gets.");
return;
endif

//If you want to just upgrade 1 level, this section would be more difficult.  This just always upgrades it to indestructable, which seems to be what you want.
SetObjProperty (magic_item, "skill"+skilladv_id, 10);
var splitted := SplitWords (magic_item.desc);
for i := 1 to len (splitted)
case (Lower (splitted[i]))
"fine": splitted[i] := "indestructable";
"durable":  splitted[i] := "indesctructable";
rugged": splitted[i] := "indesctructable";
"tempered":  splitted[i] := "indesctructable";
"of": break;
endcase
endforeach

var newname := "";
foreach word in splitted
newname := newname + " " + word;
endforeach

item.name := newname;
DestroyItem (potion);
endfunction

Again, this is purely roughed out code and not tested...

1) what versions of POL are benson scripts compatable with?

They're in both the POL 0.94 and POL 0.95 versions of the WoD scripts.

2) This is way off topic but, if I wanted to create Roleplaying order shields (Like Sanc and many other shards) but wanted to make a couple with unique devices (I was thinking of a chinese symbol for honor)what would need to be done?

A whoooooole lotta work... <a href="http://mulbuilder.hozyxon.net/">This link</a> covers most of the stuff that you'd need to do, I think. Its a tutorial for doing something similar in Mulbuilder, but the basic idea should work even if you'd use a different mul editor.
Drocket
Site Admin
 
Posts: 820
Joined: Mon Oct 07, 2002 2:54 am


Return to Scripting Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron