The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mass pm from web
Author Message
Pidrila
Apprentice
*

Posts: 36
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2013
Reputation: 0



Post: #1
Mass pm from web
How i can mass pm to all players from web? I have a database where i add mass pm., but how can i display in game this message? Something like
Code:
"select mass_pm from database_ultima where topic_status =1"

Serv.allclients sysmessage <db.row.0.masspm> ...
or open like a dialog each player..

Sent from my PAP4055DUO using Tapatalk

Code:
[PLEVEL 1]
f_mass_pm


[function f_mass_pm]
db.connect
if ( <DB.connected> )
DB.QUERY "SELECT * FROM ibf_posts WHERE status='1'"
    if (<DB.ROW.NUMROWS> > 0)
        for R 0 <eval <DB.ROW.NUMROWS>-1>
        if (<DB.ROW.<eval <LOCAL.R>>.status> = 1)
        DB.EXECUTE "UPDATE ibf_posts SET status='0' WHERE pid='<DB.ROW.<eval <LOCAL.R>>.pid>'"
        serv.log Account: <DB.ROW.<eval <LOCAL.R>>.pid> mass pm from web
        sysmessage @55 <db.row.<eval <LOCAL.R>>.post>
        endif
        end
    endif
endif

okey i got that.. but how i can add not a sysmessage but something like a dialog appears? and in this dialog shows this message..??
(This post was last modified: 02-07-2014 11:36 PM by Pidrila.)
02-07-2014 10:38 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: Mass pm from web
serv.allclients sdialog blabla

[dialog blabla]
blabla
blabla
db.connect
if ( <DB.connected> )
DB.QUERY "SELECT * FROM ibf_posts WHERE status='1'"
if (<DB.ROW.NUMROWS> > 0)
for R 0 <eval <DB.ROW.NUMROWS>-1>
if (<DB.ROW.<eval <LOCAL.R>>.status> = 1)
DB.EXECUTE "UPDATE ibf_posts SET status='0' WHERE pid='<DB.ROW.<eval <LOCAL.R>>.pid>'"
serv.log Account: <DB.ROW.<eval <LOCAL.R>>.pid> mass pm from web
dtext 100 <eval 100+(20*<dlocal.r>)> 0 <db.row.<eval <LOCAL.R>>.post>
endif
end
endif
endif

Or

[function f_mass_pm]
db.connect
if ( <DB.connected> )
DB.QUERY "SELECT * FROM ibf_posts WHERE status='1'"
if (<DB.ROW.NUMROWS> > 0)
for R 0 <eval <DB.ROW.NUMROWS>-1>
if (<DB.ROW.<eval <LOCAL.R>>.status> = 1)
DB.EXECUTE "UPDATE ibf_posts SET status='0' WHERE pid='<DB.ROW.<eval <LOCAL.R>>.pid>'"
serv.log Account: <DB.ROW.<eval <LOCAL.R>>.pid> mass pm from web
list.masspm.add <db.row.<eval <LOCAL.R>>.post>
endif
end
endif
endif

[dialog blabla]
blabla
blabla
for 0 <eval <list.masspm.count>-1>
dtext 100 <eval 100+(20*<dlocal._for>)> 0 <list.masspm.<dlocal._for>>
endfor

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 02-08-2014 12:40 AM by Extreme.)
02-08-2014 12:38 AM
Find all posts by this user Like Post Quote this message in a reply
Pidrila
Apprentice
*

Posts: 36
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2013
Reputation: 0



Post: #3
RE: Mass pm from web
Code:
[function f_mass_pm]
db.connect
if ( <DB.connected> )
DB.QUERY "SELECT * FROM ibf_posts WHERE status='1'"
if (<DB.ROW.NUMROWS> > 0)
for R 0 <eval <DB.ROW.NUMROWS>-1>
if (<DB.ROW.<eval <LOCAL.R>>.status> = 1)
DB.EXECUTE "UPDATE ibf_posts SET status='0' WHERE pid='<DB.ROW.<eval <LOCAL.R>>.pid>'"
serv.log Account: <DB.ROW.<eval <LOCAL.R>>.pid> mass pm from web
list.masspm.add <db.row.<eval <LOCAL.R>>.post>
serv.allclients sdialog d_mass_pm
endif
end
endif
endif

[DIALOG d_mass_pm]
100, 100
PAGE 0
resizepic 0 0 9300 550 270
for 0 <eval <list.masspm.count>-1>
dtext 100 <eval 100+(20*<dlocal._for>)> 0 <list.masspm.<dlocal._for>>
endfor

tried, but dialog doesnt appear for player..
only if manualy .sdialog d_mass_pm
and there appears all of messages that was made.
i need only last one..
02-08-2014 02:28 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: Mass pm from web
serv.allclients dialog_mass_pm

[function dialog_mass_pm]
trysrc <uid> sdialog d_mass_pm

[function f_mass_pm]
db.connect
if ( <DB.connected> )
DB.QUERY "SELECT * FROM ibf_posts WHERE status='1'"
if (<DB.ROW.NUMROWS> > 0)
list.masspm.clear
for R 0 <eval <DB.ROW.NUMROWS>-1>
if (<DB.ROW.<eval <LOCAL.R>>.status> = 1)
DB.EXECUTE "UPDATE ibf_posts SET status='0' WHERE pid='<DB.ROW.<eval <LOCAL.R>>.pid>'"
serv.log Account: <DB.ROW.<eval <LOCAL.R>>.pid> mass pm from web
list.masspm.add <db.row.<eval <LOCAL.R>>.post>
endif
endfor
serv.allclients dialog_mass_pm
endif
endif

another thing, clear the list before add the new msgs

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 02-08-2014 02:47 AM by Extreme.)
02-08-2014 02:44 AM
Find all posts by this user Like Post Quote this message in a reply
Pidrila
Apprentice
*

Posts: 36
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2013
Reputation: 0



Post: #5
RE: Mass pm from web
Thanks extreme Wink
02-08-2014 03:41 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)