Page 1 of 1

Script problem

PostPosted: Sun Aug 09, 2009 8:22 pm
by Peetay
Begin Shardsplitter
short OnPCEquip
if ( OnPCEquip == 1 )
player->additem "shard-arrow" 500
endif
if ( GetItemCount "shard-arrow" =< 5 )
player->additem "shard-arrow" 100
MessageBox, "Shardsplitter senses your need for arrows and has granted you an additional 100 Shard Arrows"
endif
end Shardsplitter


thats my limitless arrow script and i mean it litarly
i equip the bow it gives me my inital 500 arrows and keeps adding 100 +100 over and over cant equip because its busy playing rabbit and multiplying
help would truly be appriciated

Script problem

PostPosted: Sun Aug 09, 2009 1:40 pm
by Alexandra walker
Begin Shardsplittershort OnPCEquipshort doneThisif ( OnPCEquip == 1 )   If ( doneThis == 0 )      player->additem "shard-arrow" 500      set doneThis to 1   endIfendifif ( GetItemCount "shard-arrow" <= 5 )   player->additem "shard-arrow" 100   MessageBox, "Shardsplitter senses your need for arrows and has granted you an additional 100 Shard Arrows"endifend Shardsplitter


first thing to remember with Morrowind scripting is that it does not stop at the end; it starts over at the end. Also "=<" should be "<=". By using the code tag (not codebox because that has annoying scoll bars) you can keep your tabs when you copy and paste.

Script problem

PostPosted: Sun Aug 09, 2009 12:56 pm
by Andy durkan
Begin Shardsplittershort OnPCEquipshort doneThisif ( OnPCEquip == 1 )   If ( doneThis == 0 )      player->additem "shard-arrow" 500      set doneThis to 1   endIfendifif ( GetItemCount "shard-arrow" <= 5 )   player->additem "shard-arrow" 100   MessageBox, "Shardsplitter senses your need for arrows and has granted you an additional 100 Shard Arrows"endifend Shardsplitter


first thing to remember with Morrowind scripting is that it does not stop at the end; it starts over at the end. Also "=<" should be "<=". By using the code tag (not codebox because that has annoying scoll bars) you can keep your tabs when you copy and paste.

thank you sooo much i was wondering why i was getting that unknown operator

Script problem

PostPosted: Sun Aug 09, 2009 9:48 pm
by Pete Schmitzer
Begin Shardsplittershort OnPCEquipshort doneThisif ( OnPCEquip == 1 )   If ( doneThis == 0 )      player->additem "shard-arrow" 500      set doneThis to 1   endIfendifif ( GetItemCount "shard-arrow" <= 5 )   player->additem "shard-arrow" 100   MessageBox, "Shardsplitter senses your need for arrows and has granted you an additional 100 Shard Arrows"endifend Shardsplitter


first thing to remember with Morrowind scripting is that it does not stop at the end; it starts over at the end. Also "=<" should be "<=". By using the code tag (not codebox because that has annoying scoll bars) you can keep your tabs when you copy and paste.

thnx for the help but im still having the multiply problem i go into inventory and it keeps adding 100 arrows

Script problem

PostPosted: Sun Aug 09, 2009 6:55 pm
by Alba Casas
you need the player-> prefix on getitemcount. Otherwise it is testing the getitemcount of the item it is on, and the bow itself doesn't own any arrows. :)

Script problem

PostPosted: Sun Aug 09, 2009 7:56 am
by Cody Banks
you need the player-> prefix on getitemcount. Otherwise it is testing the getitemcount of the item it is on, and the bow itself doesn't own any arrows. :)

ill try it thnx