Jump to content

Help with companion please


thebigba

Recommended Posts

I summon my companion from the underworld and she follows me everywhere I go , she has no dialog yet :-) I'll work on that its her quiet time right now though. problem is she is too quiet , I don't have the foggiest idea why the script isnt working, But I cannot activate her to bring up the messagebox with her commands here is the script

 

 

 

scn baRaewynFriendScript

 

ref me

short follow

short find

short sneak

short fighters

short mages

short DB

short join

short Command

short blades

short button

 

Begin OnLoad

me.setignorefriendlyhits 1

me.setav speed 100

if me.getdisposition player < 100

me.moddisposition player 100

endif

 

if getincellparam AnvilFightersGuild me == 1 || getincellparam ChorrolFightersGuild me == 1 || getincellparam BrumaFightersGuild me == 1

if me.getinfaction fightersguild == 0 && player.getinfaction fightersguild == 1

MessageBox "Raewyn is not a member of the Fighters Guild. Would you like to admit her for 50 gold?" "Yes" "No"

set fighters to 1

set join to 1

endif

endif

 

if getincellparam CheydinhalFightersGuild me == 1 || getincellparam BravilFightersGuild me == 1 || getincellparam LeyawiinFightersGuild me == 1

if me.getinfaction fightersguild == 0 && player.getinfaction fightersguild == 1

MessageBox "Raewyn is not a member of the Fighters Guild. Would you like to admit her for 50 gold?" "Yes" "No"

set FIGHTERS to 1

set join to 1

endif

endif

 

if getincellparam AnvilMagesGuild me == 1 || getincellparam ChorrolMagesGuild me == 1 || getincellparam BrumaMagesGuild me == 1

if me.getinfaction magesguild == 0 && player.getinfaction magesguild == 1

MessageBox "Raewyn is not a member of the Mages Guild. Would you like to admit her for 50 gold?" "Yes" "No"

set mages to 1

set join to 1

endif

endif

 

if getincellparam CheydinhalMagesGuild me == 1 || getincellparam BravilMagesGuild me == 1 || getincellparam LeyawiinMagesGuild me == 1

if me.getinfaction magesguild == 0 && player.getinfaction magesguild == 1

MessageBox "Raewyn is not a member of the Mages Guild. Would you like to admit her for 50 gold?" "Yes" "No"

set mages to 1

set join to 1

endif

endif

 

if getincellparam CloudRulerTemple me == 1

if me.getinfaction Blades == 0 && player.getinfaction Blades == 1

MessageBox "Raewyn is not a member of the Blades Faction. Would you like to admit her for 50 gold?" "Yes" "No"

set blades to 1

set join to 1

endif

endif

 

if getincellparam CheydinhalSanctuary me == 1

if me.getinfaction DarkBrotherhood == 0 && player.getinfaction DarkBrotherhood == 1

MessageBox "Raewyn is not a member of the Dark Brotherhood. Would you like to admit her for 50 gold?" "Yes" "No"

set DB to 1

set join to 1

endif

endif

 

 

End

 

 

 

Begin OnActivate

 

If isactionref player == 1 && Player.issneaking == 0

MessageBox " What is your command? " "Follow" "Wait" "Unequip Items" "Pickup Armor and Weapons" "Equip Items" "Mount Horse" "Dismount Horse" "Summon/Dismiss Chest" "Summon/Dismiss Horse" "Access Inventory"

Elseif isactionref player == 1 && Player.issneaking == 1

activate

endif

End

 

Begin GameMode

 

set me to getself

 

sms effectSummonMythicDawn

 

if join == 1

set button to getbuttonpressed

endif

 

if join == 1

if fighters == 1

if button == 0

If player.getitemcount gold001 >= 50

me.setfactionrank fightersguild 0

set fighters to 0

player.removeitem gold001 50

set join to 0

elseif Player.getitemcount gold001 < 50

Messagebox "You can't afford to add Raewyn at this time."

endif

endif

endif

endif

 

if join == 1

if mages == 1

if button == 0

If player.getitemcount gold001 >= 50

me.setfactionrank magesguild 0

set mages to 0

player.removeitem gold001 50

set join to 0

elseif Player.getitemcount gold001 < 50

Messagebox "You can't afford to add Raewyn at this time."

endif

endif

endif

endif

 

if join == 1

if DB == 1

if button == 0

If player.getitemcount gold001 >= 50

me.setfactionrank darkbrotherhood 0

set DB to 0

player.removeitem gold001 50

set join to 0

elseif Player.getitemcount gold001 < 50

Messagebox "You can't afford to add Raewyn at this time."

endif

endif

endif

endif

 

if join == 1

if blades == 1

if button == 0

If player.getitemcount gold001 >= 50

me.setfactionrank blades 0

set blades to 0

player.removeitem gold001 50

set join to 0

elseif Player.getitemcount gold001 < 50

Messagebox "You can't afford to add Raewyn at this time."

endif

endif

endif

endif

 

if join == 1

if button== 1

set join to 0

set DB to 0

set fighters to 0

set mages to 0

set blades to 0

endif

endif

 

 

if sneak == 0

if player.issneaking == 1

me.setforcesneak 1

set sneak to 1

endif

endif

 

if sneak == 1

if player.issneaking == 0

me.setforcesneak 0

set sneak to 0

endif

endif

 

if me.getcrimegold > 0

me.setcrimegold 0

endif

 

Set Command to GetButtonPressed

 

if follow == 1

if me.isridinghorse == 1

me.addscriptpackage aaaaFollowMe

set follow to 0

endif

endif

 

if join == 0

If command == 0

me.addscriptpackage aaaaFollowMe

 

 

elseIf command == 1

me.addscriptpackage aaaDefaultStayAtCurrentLocation

 

elseIf command == 2 && me.isridinghorse == 0

me.removeallitems RaeChestRef

 

elseIf command == 3 && me.isridinghorse == 0

me.addscriptpackage aaaaAddItems

me.evp

 

elseIf command == 4 && me.isridinghorse == 0

me.MoveTo RaeMoveToRef

me.MoveTo Player

 

elseIf command == 5

me.addscriptpackage aaaaRideHorse

set follow to 1

me.evp

 

elseIf command == 6

me.evp

 

elseIf command == 7

me.cast baSummonRaeChest me

 

 

elseIf command == 8 && me.isridinghorse == 0

me.cast badrakerefsummon me

 

 

elseIf command == 9 && me.isridinghorse == 0

RaeInventoryRef.Activate Player

endif

endif

 

 

if find == 0

if getstage aaDremComp == 80 && me.getincell BARaewynDummyCell == 0

me.evp

set find to 1

endif

endif

 

End

 

Begin MenuMode 1008

 

InventoryRef.RemoveAllItems RaeRef 1

 

End

 

Can someone look through and give me an possible reason why my message box isn't coming up when i click my companion?

 

I have tried everything I can think of to get it to work, but im just a noob.

 

In the meantime I do have an equippable ring that works really well in commanding her so I can still make her do everything i need her to do . only its aggravating me as to why this script isnt working.

 

Help please :-)

Link to comment
Share on other sites

I can't really think why activating it wouldn't work... Have you done any bugtesting? If you put a message at the beginning of the OnActivate block, does it play? If you put it right before the messagebox, does it play?

 

I have not tried that yet, been preoccupied. I wonder though if maybe wll the faction stuff set before the message box command has anything to do with it.

 

While I am thinking about it I think maybe the isactionref player == 1 might have a role to play in it....

 

just tried it with this script here...

 

scn testdummy

 

short button

 

Begin Onactivate

 

Messagebox " Can you activate me?" "yes" "no"

 

end

 

begin gamemode

set button to get button pressed

 

if button == 0

Raeinventoryref.activate player

elseif button == 1

Message" goodbye"

endif

end

 

 

worked fine ....

I think its the isactionref function will test more into that.

 

Edit:

I am stumped then, I just tried it again with changing the script to

 

"if isactionref player == 1

MessageBox "samething as above example"

elseif isactionref player == 0"

 

and it worked fine

I then changed it to

" if is actionref player == 1

messagebox "mymessage"

elseif isactionref player == 1"

 

and it still worked fine...

 

I will try to rewrite the original and sort of rearrange it and see if It plays fine after.

Link to comment
Share on other sites

well, I am done with this one I am canning it, going to uninstall alot of mods and start from scratch. Create my own companion using my own scripts and my own ai packages and what not... This script here is so screwy I have no idea whats going on with it.

I got the script to work except for the spells part / On button 7 and 8 its supposed to cast the spell to retrieve its chest or its horse but it doesnt do anything. although on the ring it does.

 

I'll take what I learned from it and build my own.

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...