You're using the word "transition", which means going somewhere from an existing line of dialogue. If that's the case, where (what state in WALL1) are you transitioning FROM?
In that case, you would use an INTERJECT command.
However, if you want this to be a stand-alone dialogue for WALL1--that is, a dialogue that would OPEN with line @520 when you click-talked WALL1 with your conditions in place, then this is basically correct. The one extra note is that you can do the entire thing in a CHAIN:
CHAIN IF WEIGHT #-1
~InParty("MyNPC")
See("MyNPC") !Dead("MyNPC")
!StateCheck("MyNPC",STATE_SLEEPING)
Global("geniesgone","GLOBAL",1)
Global("Wallace","GLOBAL",1)~ THEN WALL1 GetPoison
@520 = @521 DO ~SetGlobal("Wallace","GLOBAL",2)~
== MYNPC @522
== Wall1 @523 = @524 DO ~GiveItemCreate("MISCA2","D#Silver",0,0,0)~
== MyNPC @525
== Wall1 @526
EXIT