Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 06-26-2008, 04:24 AM   #1 (permalink)
Forum Expert
 
typhoonbot's Avatar
 
Join Date: Dec 2006
Posts: 456
Default Refering to a PlayerMobile.cs Command

Hello - I am just wondering, how do I refer to a Playermobile.cs command in another script.

for example:

say I make an item, and OnDoubleClick this item must set the players "AcceptGuildInvites" command (Defined in PlayerMobile.cs) to true / false.

when I just put:

m.AcceptGuildInvites = true;

in the case, it tunes me "server.Mobile" does not contain a definition for AcceptGuildInvites, are you missing using directive blah blah...

any help ?

ta
__________________
legendsofkaine.page.tl
typhoonbot is offline   Reply With Quote
Old 06-26-2008, 06:39 AM   #2 (permalink)
Forum Expert
 
ABTOP's Avatar
 
Join Date: Sep 2006
Location: Ukraine
Posts: 883
Default

OnDouble click receive Mobile m and like you said AcceptGuildInvites declared in PlayerMobile so you need convert type from Mobile to PlayerMobile
It must seems:
Code:
PlayerMobile pm = (PlayerMobile)m;
pm.AcceptGuildInvites = true;
ABTOP is offline   Reply With Quote
Old 06-26-2008, 07:42 AM   #3 (permalink)
Forum Expert
 
typhoonbot's Avatar
 
Join Date: Dec 2006
Posts: 456
Question tried

Nevermind...

figured it all out - thank you very much for the help.
__________________
legendsofkaine.page.tl

Last edited by typhoonbot; 06-26-2008 at 07:44 AM.
typhoonbot is offline   Reply With Quote
Reply

Bookmarks

Tags
command, playermobile


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5